here's part of InfoHack which make near what you are looking for
void Affiche()
{
FormPtr form;
DmOpenRef rsrcDB;
EventType event;
int count;
FormActiveStateType curFrmState;
char str[50];
int fnt;
//set flag
FtrSet(CreatorID, 123,1);
count=0;
FrmActiveState(&curFrmState, true);
rsrcDB = DmOpenDatabaseByTypeCreator ('HACK', CreatorID, dmModeReadOnly);
form=FrmInitForm(3100);
FrmSetActiveForm (form);
FrmDrawForm (form);
// save current font
fnt=FntGetFont();
// this is Large Bold, which exist only since PalmOS 3.0, crash expected if
not
FntSetFont(7);
do
{
EvtGetEvent (&event, 100);
if (event.eType == ctlSelectEvent)
{
count=99;
}
FrmHandleEvent (form, &event);
count++;
// get the string and draw it
GetInfoHackStr1(str);
WinDrawChars(str, StrLen(str), 0, 12);
} while (count<4);
//restore the font
FntSetFont(fnt);
FrmEraseForm (form);
FrmDeleteForm(form);
DmCloseDatabase(rsrcDB);
FrmActiveState(&curFrmState, false);
//reset the flag
FtrUnregister(CreatorID, 123);
sources available in palm format ;-) at http://lthaler.free.fr/ftp
Laurent THALER
http://lthaler.free.fr
mailto:[EMAIL PROTECTED]
-----Message d'origine-----
De: Palm Developer Forum digest [mailto:[EMAIL PROTECTED]]
Date: jeudi 13 juillet 2000 09:00
�: palm-dev-forum digest recipients
Objet: palm-dev-forum digest: July 12, 2000
Subject: How to make form go away after 10 seconds?
From: "Michael Murdock" <[EMAIL PROTECTED]>
Date: Wed, 12 Jul 2000 16:29:50 -0400
X-Message-Number: 91
I have a question about a Palm app that I have
been building using CodeWarrior.
I have a form with some buttons on it. To display
it, my application calls FrmInitForm(myForm) to
load the form into memory, and then it calls
FrmDoDialog(myForm) to display the form and handle
all the user events, while the form is displayed.
When the user taps OK on my form, FrmDoDialog()
restores the display to its appearance before
the form was displayed and returns control to my
application.
Here's my problem: I want the form to sit there for
about 10 seconds. And then, if the user has not
tapped the OK button, I want the form to disappear
and have control returned to my application.
I know how to use the TimGetSeconds()function. But
that doesn't help. Because once I call FrmDoDialog()
my app no longer has control.
Here's my question: Is there an easy way to accomplish
what I am trying to do? I like how FrmDoDialog()
handles the button press events. And frankly, I
don't think I know how process button events if I use
something like FrmDrawForm(myForm). But I suspect
this is what needs to be done. Any Suggestions?
Thanks!
-Michael.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/