On Wed, 21 Jan 2004 08:54:19 -0800 (GMT-08:00), Ansel Rognlie <[EMAIL PROTECTED]> wrote:
>Is there a way to get the currently active form even when the >currently 'active' form is a popup or dialog? If you invoke a dialog using FrmDoDialog(frm), then the "frm" parameter is the form pointer you need. Typically, you get that pointer when you call FrmInitForm(). If you really need to know when this popup is active and when the form behind it is active, you can keep track of that yourself by setting a global flag just before calling FrmDoDialog() and clearing it just after the return from FrmDoDialog(). But you probably won't have any code to check that flag because all the code that is executed within FrmDoDialog() is usually default event handlers in your event loop. If your popup form is more complicated, so that it has its own event handler, then you would use FrmPopupForm(), which sends a frmLoadEvent event to your app. Then your app event loop calls FrmInitForm() to create the popup form, and then FrmSetActiveForm() to make it active. But I know for a fact that FrmGetActiveForm() does work in this case. So what's the problem? In what specific context do you wish you could call FrmGetActiveForm(), but can't? Robert Scott, Ypsilanti, MI (reply through this forum, not by e-mailing me directly) -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/