>>With a modeless form that is used with other forms, is there a way to see if that form is already open so to avoid being opened again. Other than at application level where I would set a app property
>
>You can also look at using My ClsEvent class to implement a single-instance
anything - it can be used to do a single-instance app, form, etc. To do a single-instance form:
>
>
>SET PROCEDURE TO CLSEVENT ADDITIVE
>PRIVATE oAppEvent
>oAppEvent = CREATEOBJ('cusEvent','MyFormWhatEver')
>IF TYPE('oAppEvent') # 'O'
> * My form is already running
> RETURN .F.
>ELSE
> this.AddObject('oFormInstanceEvent',oAppEvent)
this should read:
this.AddProperty('oFormInstanceEvent',oAppEvent)
> oAppEvent = NULL
>ENDIF
>
>* In Form's Destroy:
>this.oFormInstanceEvent = NULL
>
>Note - this will only allow 1 instance of the Form in all instances of your app on a given machine. You can assign an app-level instance variable and save it in your application object, and concatenate that with the form event name to limit it to one instance of the form per instance of the app running. It's a handy way to limit concurrent access to any resource on a given system. It's all VFP source, one procedure file, and a sample single-instance app prefix demo.