I use the following code to hardcode the active form, but cannot restore
the state and display. Is it there any other way so that
no need to hard set like this!!!!
{
UInt cardNo;
LocalID dbID;
DmSearchStateType searchInfo;
Err err;
DWord appLaunchResult;
Ptr cmdPBP;
err = DmGetNextDatabaseByTypeCreator (true, &searchInfo, 'appl','clee',
true, &cardNo, &dbID);
cmdPBP=MemPtrNew(100);
SysAppLaunch( cardNo, dbID,
sysAppLaunchFlagNewStack |
sysAppLaunchFlagNewGlobals ,
sysAppLaunchCmdNormalLaunch,
cmdPBP, &appLaunchResult );
MemPtrFree(cmdPBP);
}
frmP = FrmInitForm(MainForm);
FrmSetActiveForm(frmP);
FrmSetEventHandler(frmP, MainFormHandleEvent);
FrmSetEventHandler(FrmGetActiveForm(), MainFormHandleEvent);
MemSet (&newEvent, sizeof(EventType), 0);
newEvent.eType = frmOpenEvent;
newEvent.data.frmOpen.formID = MainForm;
EvtAddEventToQueue (&newEvent);
Eric シg、J。G
> is there any other way using SysAppLaunch?
>
> I use the code like that
> {
> UInt cardNo;
> LocalID dbID;
> DmSearchStateType searchInfo;
> Err err;
> DWord appLaunchResult;
> Ptr cmdPBP;
>
> err = DmGetNextDatabaseByTypeCreator (true, &searchInfo, 'appl','clee',
> true, &cardNo, &dbID);
> cmdPBP=MemPtrNew(100);
> SysAppLaunch( cardNo, dbID,
> sysAppLaunchFlagNewStack |
> sysAppLaunchFlagNewGlobals ,
>
> sysAppLaunchCmdNormalLaunch,
> cmdPBP, &appLaunchResult );
> MemPtrFree(cmdPBP);
> }
>
> SysAppLaunch can launch cllee, however , it cannot return back to my caller
> program. just show a blank page. I have check the form
> that is not my caller form.
>
> Eric
>
> Eric シg、J。G
>
> > where is the api AppCallWithCommand() found?
> >
> > John Valdes シg、J。G
> >
> > > On Wed, Jul 05, 2000 at 11:54:40AM +0800, Eric wrote:
> > > > my program A want to call another program B, and return back to A. I
> > > > have tried to use sysAppLaunch, when at B, press the HOME button,
> > > > cannnot return to program A, but when press once more, it quit program A
> > > > and go to Launcher. can anyone tell me what's the problem?
> > >
> > > Assuming program B is yours too, try using AppCallWithCommand()
> > > instead of SysAppLaunch(). AppCallWithCommand() allows one program
> > > (A) to start another program (B) with a custom launch code. When
> > > program B quits (returns), control is returned to program A. You
> > > define the launch code (any integer > 32767) and a parameter block
> > > which can be used to exchange data between the applications.
> > >
> > > For example, say program A (caller) has a form in which you enter two
> > > integers. After pressing a button, it then calls program B (callee)
> > > to add the two integers, which in turn returns the result to A. You
> > > could do this with the following:
> > >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/