How can i do for see to Label caption change

shu-shu-shuk

New member
Local time
Tomorrow, 03:04
Joined
Apr 9, 2022
Messages
5
Hi
How can i do for see to Label caption change (source is in progres)
I tried this module
'Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal milliseconds As LongPtr)'
It's possible to wait, but I can't see the change.
OTL
 
You should not have to wait at all. If you do something like this:

Code:
control-name.Caption = "Some text"
Me.Repaint

then any caption changes should be immediately visible. Note that if you make a change that changes an underlying recordset that is currently visible, it is possible IN THAT CASE to require a Me.Requery instead. But captions can get by with .RePaint

If you are doing several captions at once, just do the RePaint after the last one of the sequence. They will all appear to change at once.
 
Thank you for your help.
 
A "doevents" at the end might also do the same job of "publishing" all pending screen updates.
 
Me.Repaint is not necessary
 
Cronk, OP was not seeing the label change. In fact, ANYTHING that implied a .Repaint would have worked. That was just a simple solution to force the issue.
 
I've never had to use Repaint after a label caption change. But you are right on a belts and braces basis.
 

Users who are viewing this thread

Back
Top Bottom