Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Command1.Caption = "Hi"
Sleep 1000
Command1.Caption = "Go Away now!"
Sleep 1000
Command1.Caption = "I said leave..."
End Sub
I've got that code, and it works perfectly... at home. Where it doesn't work however, is at school, I'm running windows 98, they're using XP with extremely limited access(IE: no system files). When I try to run that sample project I wrote up, It gives me a run-time error along the lines of no sleep found in kernel32. My theory is that either the limited access is stopping VB from using kernel32, or that windows XP works a bit differently than 98 with that file. Anyone care to comment?