Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing a label caption
Message
From
11/04/2000 13:34:13
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00357731
Message ID:
00358211
Views:
12
>I agree it's weird. Have you tried some work-arounds? 1) Add a command between the Refresh and the RunSomeSQL commands. Call a dummy method for instance. 2) Try putting a LockScreen command around the first two commands and/or around the RunSomeSQL command.
>
>Just WAGs, but I'm working on a new SQL-Server project and I'll probably run into this one within a week or two. Let us know what works if anything.
>
>HTH
>Barbara

Part of it may have to do with the fact that the Label class does not have a .Refresh() method and does not respond to a cascading Thisform.Refresh() call. It's possible that the the CPU is getting tied up doing the SQL statement before it finishes changing the Caption of the label.

Another thing to consider: is there any particular reason to not use a subclass of TextBox, built to look like a label? This is my approach when I have a label that changes often, especially when the Value of the TextBox is evaluated on a programmatic basis ('"Number of records = " + ALLTRIM(STR(lnSomeNumber))', for example). My personal classes are built to respond in this manner, based on calls from dmsTextBox.Refresh().
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform