Home All Groups Group Topic Archive Search About

Using Waitable Timer APIs with VB.NET.

Author
26 Apr 2006 8:03 PM
Sam
Hello:
Can anyone provide me some idea on how to replace the Sleep method.
Major Disadvantage that I have been facing with the Sleep method is
that the
application freezes during the sleep time and does not respond to any
other events like the
-- onComm event of the Serial port. I have been using a serial port
class in VB.NET as serial port component does not exist in VB.NET.

I am looking for somedata on how to use Waitable Timer APIs with
VB.NET.

Thanks in Advance

Please look at the link below for more information on waitable API
timers:
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/3e2621c4887d94f/01963709a1ee9f8e?lnk=st&q=VB.NET+Wait+Timer+class&rnum=1&hl=en#01963709a1ee9f8e

Author
26 Apr 2006 10:26 PM
Spam Catcher
"Sam" <indianmostwan***@yahoo.com> wrote in news:1146081826.663361.221970
@e56g2000cwe.googlegroups.com:

> Hello:
> Can anyone provide me some idea on how to replace the Sleep method.
> Major Disadvantage that I have been facing with the Sleep method is
> that the
> application freezes during the sleep time and does not respond to any
> other events like the
> -- onComm event of the Serial port. I have been using a serial port
> class in VB.NET as serial port component does not exist in VB.NET.

Thread.Sleep should not hang your GUI thread - are you running the
procedure in a new thread?

You can also look into async event handlers - this lets you fire a function
off and do the processing asychronously.