Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Argah how do I make this tiny little function work
Message
From
21/06/2001 04:14:28
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00521503
Message ID:
00521781
Views:
20
Thanks!

DOEVENTS worked a treat.

I am considering putting a DOEVENTS command in the Qmess function below but I am a bit concerned about your comment that the command is buggy.

Putting it in the Qmess utility would mean that it is called quite a lot.
Do you think this course is an advisable one.

Many Thanks



>Hi!
>
>In addition to what George said, check if _VFP.AutoYield is .T. If it is .F., any control is not refreshed until code stops running. You can use also DOEVENTS after text box refresh if you do not want to set AutoYield to .T., however DOEVENTS command it is buggy and slow (with some workaround).
>
>>The idea of this little function is to display status messages as my routine progresses.
>>
>>I keep it in my procedure library.
>>
>>If it finds a field on the active form called qmess it is supposed to update it and show it.
>>
>>It works fine if I step through the code, but when I don't step through the code nothing at all displays in the field qmess (not even the default wait message)
>>
>>It is being called by a program called RASDIAL() which is in turn being called by an event on my form.
>>
>>I can do things in a different way but this is very handy for me. (if I can make it work)
>>
>>
>>
>>*[99
>>* OVERVIEW of QMESS
>>* uses wait window to print a quick message on the screen
>>* converts any tilde ~ characters it finds to chr(13)
>>* to help with formatting the output
>>* If there is a text field on the active form called qmess it will
>>* output to that field instead
>>*]99
>>
>>	Func qmess
>>	Param lcMessage
>>	lcMessage=STRTRAN(lcMessage,'~ ','~')
>>	lcMessage=STRTRAN(lcMessage,'~',CHR(13))
>>	If type('_screen.activeform.qmess')='O'
>>		_Screen.activeform.qmess.value=lcMessage
>>		_Screen.activeform.qmess.refresh
>>	Else
>>		Wait WINDOW lcMessage NOWAIT
>>	Endif
>>	Return .T.
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform