Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for a NoRefreshOnOpen
Message
From
08/12/2007 10:18:41
 
 
To
08/12/2007 05:11:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01274125
Message ID:
01274151
Views:
9
>>When I open a particular form, the built in VFP activity refreshes all my controls. This is normally a good thing … but in this case I have controls that during their refresh, call the refresh event of other controls to complete a cascading start up logic of my own (that includes some data manipulation). What I’m looking for is the equivalent of a data session’s NoDataOnLoad so that I can set what is effectively a “NoRefreshOnOpen” for the form.
>>
>>If this isn’t possible, I’m willing to set a global glBlockRefresh = .t. before calling my form, and put:
>>
if glBlockRefresh
>>  return
>>endif
>>at the top of each refresh(). I would have tried it already, but I don’t know how to determine that control has returned to me so that I can then set glBlockRefresh to .f. and then programatically call appropriate refreshes to get things going. That is, where would I put glBlockRefresh = .f. I’m assuming that it’s at the top of the form’s Init, but I’m not sure.
>>
>>Any ideas on a NoRefreshOnOpen (or equivalent)?
>>
>>Bob
>
>Check form BindControls property in HELP.

BindControls wasn’t appropriate in my case, as it blocks binding controls to ALL data sources. In some of my combo boxes I create a SQL query (that doesn’t get run with BindControls = .f.) then generates an error when the control references a field in the missing query result.

It was the key though to understanding my problem better. I now realize that I need something more selective so I’m opting for the glBlockRefresh approach in SOME of my controls.

I’m experimenting now with turning it off by putting glBlockRefresh = .f. in the Form’s Activate, or Init events, or in the KeyPress and MouseDown events.

Bob
Previous
Reply
Map
View

Click here to load this message in the networking platform