Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00622332
Message ID:
00623992
Views:
22
Mark,

You need to disable the other forms when you want the top level forms to mimic the modal behavior. Here's the code I use in the Init() and Unload() methods of my base class of modal forms. Note, the code assumes that all forms are part of my application object.

Init()
FOR EACH loForm IN THIS.Parent.Objects
IF loForm.BaseClass = 'Form' AND loForm.Name <> THIS.Name
loForm.Enabled = .F.
ENDIF
ENDFOR

Unload()
* Re-enable all of the forms that were deactivated in the init of this form.
FOR EACH loForm IN THIS.Parent.Objects
IF loForm.BaseClass = 'Form' AND loForm.Name <> THIS.Name
loForm.Enabled = .T.
ENDIF
ENDFOR
Previous
Reply
Map
View

Click here to load this message in the networking platform