Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

label caption

Status
Not open for further replies.

Rottdpogs

IS-IT--Management
Joined
Jul 17, 2001
Messages
86
Location
CN
i have a multiple loop and i use a label.caption for my tracking info but sometimes it the label.caption doesnt change, does someone have encountered this, please advice. thanks.
 
HI
I assume your purpose of setting this caption is to let know what process is going on and while in that process loop.. you set the caption .. so that you know what is happening. HOwever, if the process is very fast, (the display of the label caption goes with the screen refreshing).. you may not be able to see that visualy. HOwever.. the flashing of that process could take place.

Also, think of using..
WAIT WINDOW myProcess NOWAIT.. where myProcess is identical to the caption you set for the label. This can replac your need to maintain a label for this purpose and to see a place to hold that.
ANother imprtant thing is to insert a WAIT WINDOW as above without NOWAIT to see if your process does occur.

Hope this helps you to rectify the situation :-) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Hi,

I sometimes use the setfocus event to get windows to update
an edit box with its current content - haven't tried this with a label - but it would most likely work...

DO WHILE I < 100
THISFORM.LABEL1.CAPTION = STR(I,3,0)
THISFORM.LABEL1.SETFOCUS
I = I +1
ENDDO
Regards

Griff
Keep [Smile]ing
 
Labels don't have a SetFocus() method.

Ian
 
For whatever reason, I have found

ThisForm.Label1.Caption = 'Something'
=INKEY( .1, 'HM')

to work better than a refresh. Granted, if you are doing some sort of processing where you don't want screen i/o to slow it down, you don't want to use my method any more that you would want to use a WAIT WINDOW or Refresh. However, it
updates something like a label more reliably than a refresh.

Dave S.
 
Personally, I'm pretty disappointed with the &quot;standard&quot; visual objects as far as update speed.

For instance, I made two different &quot;progress bar&quot; type controls. On one of them, I created a label with an opaque background to use as the bar. To change the &quot;percentage&quot;, simply change the Width property of the label. No matter how often you change the property, the bar would 2-3 times per second, giving it a VERY rough look.

On the second one, I created and updated the bar using &quot;outdated&quot; @..TO commands. This one updates smoothly in real time and looks VERY nice. I also use the GetSysColor API routine to make the bar the correct color.

I'm kinda sad that these obsolete commands are no longer documented since some of them are actually better than the replacements. I wouldn't have been able to figure out the @..TO command if there wasn't a good example in the code I inherited.

Ian
 
Another alternative to WAIT WIND or INKEY() is the WinAPI call:-

DECLARE integer Sleep in Win32API integer
Sleep(5) && Stop for 5 milliseconds.

It can't be defeated by a mouse click and can go down to a single millisecond delay if that's all it takes to get a result. HTH

Chris [pc2]
 
thanks. i've already tried using inkey() it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top