main logo
Subject: Re: Single instance forms?
Author: Jun M. Ramoneda
Posted: 2002/10/08 07:37:46
 
View Entire Thread
New Search


In the Load event of your form class, add a new property (lAllowMultipleInstances) and put in the following code:

LOCAL loForm

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

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

RETURN DODEFAULT()

<i><font color="#663300">CB seems to very nicely handle multiple instances of a form,
but what if I *don't* want to allow a form to have
multiple instances? How do I stop it please?

Many thanks</font></i>


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