main logo
Subject: Preventing multiple form instances
Author: Jun M. Ramoneda
Posted: 2002/05/23 14:22:22
 
View Entire Thread
New Search


How do you prevent multiple instances of a form? I've tried the method suggested in message #2630 and this works for a form based on cBizObjForm. Once I put a cBizObj on the form, the whole thing stops working. What I've experienced is that I still get to instantiate a form multiple times and I can't close the form. Here's the code I've put in the Init method of the form:

LOCAL loForm

IF NOT This.lAllowMultipleInstances
loForm = goApp.oForms.Get(This.Class)

IF TYPE('loForm') == 'O'
loForm.Show()
RETURN .F.
ENDIF
ENDIF

DODEFAULT()

Any suggestions?
 
©2002 Jun M. Ramoneda
<-- Prior Message New Search Next Message -->