Hi,
FrmReturnToForm() doesn't post an frmOpenEvent.
Moreover this function is very different from
other Frm??() functions.
FrmGotoForm posts two events and returns to the
caller without any major changes. You form will
be given a graceful "frmCloseEvent", followed
by a frmLoadEvent, and frmOpenEvent for the
new form.
When you call FrmReturnToForm(), your form data
structures are *destroyed*, right at that call
and it doesn't post any event, not even an
frmCloseEvent for your active form. If you
want the form "behind" to redraw, you must
set the "save behind" flag or explicitly
send draw() (as you do here) or you could
even send a custom event to back to the
first form.
--- Samir Raiyani <[EMAIL PROTECTED]> wrote:
>
> I have 5 different forms in my app. But for this
> one form, when I use
> FrmGoToForm, I get the "Form Already Loaded" error.
> So I have started
> using FrmReturnToForm instead.
>
> But FrmReturnToForm does not invoke the FrmOpenEvent
> on the FormX (in the
> example below). Hence I have the following piece of
> code in the event
> handler for FormY.
> ....
> case SomeButton:
> FrmReturnToForm(FormX);
> frm = FrmGetActiveForm();
> FrmDrawForm(frm);
> break;
> ...
>
> FrmReturnToForm makes FormX active.
>
> Samir
>
> Jimmy Stricker writes:
> >
> >
> > I am pretty sure that if you have code after
> FrmReturnToForm, that code
> > will still be executed.
> >
> > I usually use FrmGotoForm.
> > What happens is the FrmReturnToForm will get
> placed on the event queue, but
> > won't be processed until it return from your form
> handle event.
> >
> > Hope that helps.
> > Jimmy
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Fawcett, Mitch
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 03, 1999 11:04 AM
> > To: 'PalmDevForum'
> > Subject: FrmReturnToForm
> >
> >
> > This is a simple question I'm sure but it's making
> me crazy.
> >
> > If I have two form event handlers one for FormX
> and one for FormY. FormX
> > opens FormY. FormY does some things and then does
> a FrmReturnToForm making
> > FormX the active form again.
> >
> > My question is, what's the situation with the
> statements following the
> > FrmReturnToForm in the FormYHandler routine? Does
> it make sense to have
> > anything following a FrmReturnToForm if processing
> is being transferred back
> > to the event handler for FormX?
> >
> >
> > void FormXHandler (void)
> > {
> > ... open FormY
> >
> > }
> >
> > void FormYHandler (void)
> > {
> > ... some stuff
> > FrmReturnToForm (ptrFormX)
> > ... some more stuff
> >
> > }
> >
> >
> >
> >
> >
>
>
>
===
Ion Popescu
[EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com