
07-12-2012, 10:14 AM
|
|
Newcomer
|
|
Join Date: May 2008
Posts: 8
|
|
vb6 function to vb.net
|
Hi all,i got a vb6 function like this
Code:
Private Sub pause(ByVal interval As Variant)
Dim Current As Variant
Current = Timer
Do While Timer - Current < Val(interval)
DoEvents
Loop
End Sub
and i tried convert into this way :
Code:
Private Sub pause(ByVal interval As Single)
Dim newDate As Date
newDate = DateAndTime.Now.AddSeconds(interval)
While DateAndTime.Now.Second <> newDate.Second
Application.DoEvents()
End While
End Sub
It doesn't works.Could someone help me pointing where is the wrong?Thanks a lot guys.. 
|
|