Re: How to find the active form in CF by Simon
Simon
Sat Sep 16 04:54:12 CDT 2006
It is not the same though is it because you are having to remember to set
this variable in each form (page_load delegate).
If you were to derive from a form, this class would handle this variable so
you would not have to remember to set it in each form you create.
Regards
Simon.
"Hari" <hadusumalli@mantragroup.com> wrote in message
news:1157958995.702471.291100@e3g2000cwe.googlegroups.com...
> Hi Simon,
> Actually i'm not aware of SNAPI. I'm developing the app. using
> .Net Compact Framwork and the language as C#. And regarding your second
> suggestion, is it not similar to the way i've done. I've used a class
> which is meant for holding the instance of the current form and i'm
> setting that instance in the page_load event of every form. I think
> this is almost similar to deriving from a base form which holds the
> form instance as you said. Is it any different. Any other suggestion?
> Thanks for the help.
>
> - Hari
> Simon Hart wrote:
>> Have you looked at the SNAPI (State Notification API) for Windows Mobile
>> 5
>> if you are using it. I can't remeber off the top of my head whether the
>> functionality you require is available in SNAPI.
>>
>> Alternaively, have you considered creating a base form to which each form
>> derives which handles this global variable?
>>
>> Regards
>> Simon.
>>
>> "Hari" <hadusumalli@mantragroup.com> wrote in message
>> news:1157811077.536962.51800@h48g2000cwc.googlegroups.com...
>> > Hi,
>> > Can any one plz tell me how to know which form is active in an
>> > application. My app contains many forms and requires to identify the
>> > active form very frequently. I found that there is no property like
>> > Form.ActiveForm available in CompactFramework. I could use a class
>> > which contains a Form class variable to store the current form instance
>> > and assign to it the current form instance in the page_load event of
>> > that form. But this may lead to bugs if i fail to assign the correct
>> > form instance. So i prefer a more direct way. Plz help!
>> >
>> > - Hari
>> >
>