You have to use the object's index:
FrmSetObjectPosition(pForm, FrmGetObjectIndex(2000), 10, 10);
Regards,
Miro
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Ben Combee
>Sent: Thursday, March 09, 2006 10:07
>To: Palm Developer Forum
>Subject: Re: Changing GUI while the program is running
>
>On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Hi,
>> I'm adding the following line "FrmSetObjectPosition(pForm,
>2000, 10, 10);" to redraw a button at a different position.
>The button Id is 2000 and I added this line in the
>MainFormHandleEvent function. But when I run this on the PDA I
>get an error saying "Fatal Exception".
>
>This API doesn't take a control ID, it takes a control index.
>You need to call FrmGetObjectIndex first to find out that
>value (as stated in the docs).
>
>--
>For information on using the PalmSource Developer Forums, or
>to unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/