VB.NET equivalent of Timeout.bas Module from VB6

Posted by user557889 on Stack Overflow See other posts from Stack Overflow or by user557889
Published on 2010-12-30T04:49:42Z Indexed on 2010/12/30 4:53 UTC
Read the original article Hit count: 334

Hi all. I am looking for the VB.NET code of a very handy little *.bas file I used to use in Visual Basic 6. The file was called timeout.bas and it was the greatest module ever to me. I want to switch to start using VB.NET finally but this single file is holding me back. Trying to use .NET without it is like crippling me. Can someone, anyone please make this code work in .NET for me?

It's only a couple lines:

Attribute VB_Name = "Module1"
Sub timeout(duration)
starttime = Timer
Do While Timer - starttime < duration
DoEvents
Loop
End Sub

Basically you add that timeout.bas file which contains that code and you can just do:

Text1.text = "hello"
timeout .5
Text1.text "World!"

It's so awesome. Anyone PLEASE re-do it in VB.NET for me! Thanks!

© Stack Overflow or respective owner

Related posts about .NET

Related posts about visual-studio