|
-
Jul 8th, 2011, 06:55 PM
#1
Thread Starter
Member
Resolved: VB2005, how to refresh labels/textboxes
Hi.
I remember that in VB5 there was an "auto-redraw" property that needed to be turned on in order to make certain features refresh themselves. I'm having trouble with getting labels and text boxes to change in VB2005.
A sample code snip would be
Code:
Label1.text = "Zero"
Sleep (1000)
Label1.text = "One"
Sleep (1000)
Label1.text = "Two"
Sleep (1000)
...
Label1.text = "Five"
EndSub
Which should make Label1.text count upwards at one-second intervals.
When I run the code, however, Label1.text shows "Zero" for five seconds, then says "Five" when the subroutine ends. How can I make the label refresh after each change?
If I use a textbox instead of a label, the same thing happens.
(this uses the API call "Sleep" to insert a pause, declaration not shown here)
Any thoughts?
Last edited by Og_ofthejungle; Jul 12th, 2011 at 12:23 AM.
Reason: Resolved.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|