Hi Dan,

I remember people said st about FrmReturnToForm(0) before. (Search the forum for 
FrmReturnToForm
:) ) So, I never use it. What I did is:

Let say you are in FromA, you will show FormB (modal form), then you go back to FormA. 
I only use
the pair FrmPopupForm() and FrmReturnToForm() for modal form.

UInt16 backFromFormB = 0;
...

backfromFormB = FrmGetActiveFormID(); // I call this right before FrmPopUpForm()
FrmPopUpForm(FormB);
...

//When you are about to go back to FormA 

FormBExit(); // do anything you want to do in frmCloseEvent of formB
if (backFromFromA) {
   FrmReturnToForm(backFromFormB);
} else {
   FrmReturnToForm(FormA);
}

I guess you can always call FrmReturnToForm(FormA); if you are sure about that. 

One thing to remember is FrmReturnToForm() doesn't generate frmCloseEvent for FormB, 
so you want
to do whatever you need to do before you go back to FormA in FormBExit(). Also put 
FormBExit() in
frmCloseEvent of FormB because it will be call when you are in FormB and the user 
exits your
program.

In debugger, when you are in FormB, if you set a break point in FormAHandleEvent(), as 
soon as
FrmReturnToForm() is called, I think it will hit the break point. If after 
FrmReturnToForm(), your
program doesn't go to handle the event for FormA, where does it go?

You can try this, after FrmReturnToForm(), call FrmGoToForm(FormA), if you do that, 
even you don't
have any code to update FormA, FormA still gets update OK, just the screen is 
flicking. I did tell
you that last email because I think that is the quick and dirty way to do it but I had 
to do that
before.

Hope that helps.

tnn

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to