Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check Form Mode - Design vs Run
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01249057
Message ID:
01249058
Views:
14
I didn't think of it until just now, but I guess I could check whether thisform.dataenvironment is an object. I'm still open to other ideas or any flaws with the solution I just proposed.

>Does anyone know of a way to ascertain in code whether a form is currently in design-mode or is being run inside the VFP IDE? For clarification, I'm not talking about using _vfp.startmode or the Version() function.
>
>Let's say you create a new form and are sitting in the form designer in VFP, then you run the form in VFP. Is there anyway to know programmatically the difference between those two states (design vs run). I'm thinking that perhaps there is some system variable that is defined/not defined, some property of _vfp/_screen that could be checked, some object that exists in memory during one state and not the other, a Sys() function that could be called, some code that could be run that would throw an error in one scenario but not the other, etc. Any ideas would be greatly appreciated. Thank you.
>
>PS The reason I need this is because I want a certain routine I've written to execute when a form is in design-mode but not when the form is being run (within the IDE or a compiled EXE).
Previous
Reply
Map
View

Click here to load this message in the networking platform