Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close Open Windows Issue
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01446887
Message ID:
01446889
Views:
46
Check this FAQ How can I release all open forms FAQ #7975 - you don't want to perform the check you're doing.

_screen.Forms is a collection of individual forms.

>I'm having a minor issue with the following routine to close any open windows when my application does an auto shutdown due in inactivity. I'm not sure why this is, but I keep gettings FORMS is not an object in my error log. The application does close any open dialogs, but with 50 users, the log is getting filled up with this error message.
>
>Thanks for any help.
>
>
>local lnForms, i
>lnForms = _screen.formcount
>SET MESSAGE TO [Closing Dialogs...]
>IF lnForms > 0
>	FOR i = lnForms to 1 STEP -1
>		IF VARTYPE(_screen.Forms)=[O]                                                      << FORMS is not an object
>			SET MESSAGE TO [Closing Dialog: ]+_screen.Forms(i).Name    << FORMS is not an object
>			_screen.Forms(i).Release                                                          << FORMS is not an object
>		ENDIF 
>	ENDFOR
>ENDIF 
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform