Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close a form programatically
Message
 
 
To
19/07/2009 20:25:04
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01413271
Message ID:
01413308
Views:
52
>>>I need to be able to close an open form from code. I don't want to close the entire application, just a form. I can identify the form and get the handle with an API call. Now what? TIA
>>
>>If you can get a reference to this form, can you just call myForm.Release() ?
>
>The code to close the form needs to be outside the form itself. In this case, the code would reside in a menu command.

I understand, but you still will call the release() method once you have a reference to the form.

E.g.
for each loForm in _screen.Forms

   if loForm.Name = "FormWeWantToClose"
      loForm.Release()
     exit
   endif
next
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform