Hi Plater,
Yes, thanks or the info! I'm guilty of looking too deep!
One thing that is becoming obvious with .NET is that if some code is more than 5 lines long, then there must exist an easier way! lol
MACH4
User Profile
Collapse
-
Hi M,
Just to qualify my last message statement, I've just concocted the following code using the win32 api "UpdateWindow". ..
Declare Auto Function UpdateWindow Lib "user32"(By Val hwnd As IntPtr) As IntPtr
' Button handler code
Dim ptr As IntPtr = Handle
TextBox1.Text = "Waiting"
UpdateWindow(pt r)
Thread.Sleep(50 0)
...Leave a comment:
-
Hi M,
Thanks for replying!
Yes your additional line does work thanks!
Must admit I haven't used the Sleep command much before and my default language is Assembler, which prompted me to check it out further in that language.
It seems that Do.Events (in this particular case) is equivalent to the UpdateWindow api function call. Using InvalidateRect to force a re-paint didn't work...
...Leave a comment:
-
Sleep command problem
Hi all,
First post!
Learning vb.net
the following is the button handler code:
TextBox1.text = "Sleeping"
Thread.Sleep(50 0)
TextBox1.text = "Done!"
Why is the first line being ignored?
TextBox stays empty until after Sleep() then shows "Done" message...
Thanks for any help!
No activity results to display
Show More
Leave a comment: