that page loads in that time, right now I am using following code,
=================================
Public Sub waitBySecs(ByVal nNumSecs As Integer)
Dim d1, d2 As DateTime
d1 = DateTime.Now.AddSeconds(nNumSecs)
d2 = DateTime.Now
While DateTime.Compare(d2, d1) < 0
Application.DoEvents()
d2 = DateTime.Now
End While
End Sub
====================================
but the problem in this function is that it takes the whole CPU usage,
so I am looking for an alternative for it.
TIA
~kuls
Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.comput
Threading.Thread.Sleep(100)
before
End While
this will make execution to sleep (wait) 100 milliseconds
before going back to While...
--
Hope this helps,
Zeeshan Mustafa, MCSD
"kuldeepiitk" <kuldeepiitk@.yahoo-dot-com.no-spam.invalid> wrote in message
news:40d6882d$3_2@.Usenet.com...
> Is there any way that i can make my application wait for some time so
> that page loads in that time, right now I am using following code,
> =================================
> Public Sub waitBySecs(ByVal nNumSecs As Integer)
> Dim d1, d2 As DateTime
> d1 = DateTime.Now.AddSeconds(nNumSecs)
> d2 = DateTime.Now
> While DateTime.Compare(d2, d1) < 0
> Application.DoEvents()
> d2 = DateTime.Now
> End While
> End Sub
> ====================================
> but the problem in this function is that it takes the whole CPU usage,
> so I am looking for an alternative for it.
> TIA
> ~kuls
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ------------------
> http://www.usenet.com
0 comments:
Post a Comment