Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Argah how do I make this tiny little function work
Message
 
 
À
21/06/2001 04:14:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00521503
Message ID:
00521820
Vues:
14
Hi!

Just take a look to the http://support.microsoft.com/support/kb/articles/Q268/7/71.ASP
That is why I though to think twice what better to use, _VFP.AutoYield = .T. or DOEVENTS. I prefer first approach in a continuous loop to update progress bars.

>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.
>>>
>>>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform