Página 1 de 1

Request for example

Publicado: Jue Feb 21, 2008 5:54 am
por g.s.rogers
Could someone give me a short example of calling a form from a menu? Is it
as simple as:
METHOD MainMenuItem6_2Click( oSender, oMenu ) CLASS TFormMain
TFormSplash:show
RETURN Nil
Thanks,
Gary S. Rogers

Request for example

Publicado: Jue Feb 21, 2008 6:16 am
por g.s.rogers
After looking at a sample, I think it is:
TFormSplash():New( Self ):ShowModal()
is that right?
Gary
"Gary S. Rogers" <g.s.rogers@att.net> wrote in message
news:[email=47bd0408@ozsrv2.ozlan.local...]47bd0408@ozsrv2.ozlan.local...[/email]
> Could someone give me a short example of calling a form from a menu? Is it
> as simple as:
>
> METHOD MainMenuItem6_2Click( oSender, oMenu ) CLASS TFormMain
> TFormSplash:show
> RETURN Nil
>
> Thanks,
> Gary S. Rogers

Request for example

Publicado: Jue Feb 21, 2008 7:28 pm
por jfgimenez
Gary,
> After looking at a sample, I think it is:
>
> TFormSplash():New( Self ):ShowModal()
>
> is that right?
Yes!
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Request for example

Publicado: Jue Feb 21, 2008 8:02 pm
por Gejza Horvath
Gary,
you can use also this recommended (faster and clear) code:
WITH OBJECT TFormSplash():New( Self )
:ShowModal()
* If you need the result from the modal form:
/*
IF :nModalResult == mrOK
.. do here what you need
ELSE
.. The dialog was canceled
ENDIF
*/
END WITH
In this context look also for the TForm:lCloseOnExit property in the doc, for the case you
need some values entered by user on the dialog form.
Gejza Horvath
"Gary S. Rogers" <g.s.rogers@att.net> pí¹e v diskusním pøíspìvku
news:[email=47bd0925@ozsrv2.ozlan.local...]47bd0925@ozsrv2.ozlan.local...[/email]
> After looking at a sample, I think it is:
>
> TFormSplash():New( Self ):ShowModal()
>
> is that right?
>
> Gary
>
>
>
> "Gary S. Rogers" <g.s.rogers@att.net> wrote in message
> news:[email=47bd0408@ozsrv2.ozlan.local...]47bd0408@ozsrv2.ozlan.local...[/email]
>> Could someone give me a short example of calling a form from a menu? Is it as simple
>> as:
>>
>> METHOD MainMenuItem6_2Click( oSender, oMenu ) CLASS TFormMain
>> TFormSplash:show
>> RETURN Nil
>>
>> Thanks,
>> Gary S. Rogers
>
>