|
|
Windows Mobile 5.0 in Single Instances |
|
Author |
Message |
gwatts

|
Posted: Mon Jan 07 01:42:00 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
Hi All,
I have developed a WM 5.0 with C# device application. I have around 10
forms, this is similar to a wizard, user can navigate forward or backward in
the application, when the user move forward a new instance of a particular
form will be created and used and when the user moves backward the current
form will be closed. when the user moves forward there is a possibility of
created more instances of the form repeatedly so after a certain time i am
getting a Stack Overflow Exception. Please let me know if any solution.
Sample code is also welcomed.
Thanks,
Computer82
|
|
|
|
 |
Madhan

|
Posted: Mon Jan 07 01:42:00 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
Is it possible to run the whole application in a single instance. That is
exactly what i needed
> Hi All,
>
> I have developed a WM 5.0 with C# device application. I have around 10
> forms, this is similar to a wizard, user can navigate forward or backward in
> the application, when the user move forward a new instance of a particular
> form will be created and used and when the user moves backward the current
> form will be closed. when the user moves forward there is a possibility of
> created more instances of the form repeatedly so after a certain time i am
> getting a Stack Overflow Exception. Please let me know if any solution.
> Sample code is also welcomed.
>
> Thanks,
|
|
|
|
 |
ctacke/>

|
Posted: Mon Jan 07 10:39:52 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
Sure, simply keep the Form instances referenced in the application instead
of creating new ones every time you move forward or back.
--
Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
> Hi All,
>
> I have developed a WM 5.0 with C# device application. I have around 10
> forms, this is similar to a wizard, user can navigate forward or backward
> in
> the application, when the user move forward a new instance of a particular
> form will be created and used and when the user moves backward the current
> form will be closed. when the user moves forward there is a possibility of
> created more instances of the form repeatedly so after a certain time i am
> getting a Stack Overflow Exception. Please let me know if any solution.
> Sample code is also welcomed.
>
> Thanks,
|
|
|
|
 |
Fabien

|
Posted: Mon Jan 07 10:44:21 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
Hi,
Try to create a main Form and then create your others Forms in User
Controls. Create all your User Controls, add them to your main Form
and then show and and hide them when you navigate....
BR
Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant
ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/
> Is it possible to run the whole application in a single instance. That is
> exactly what i needed
>
>
>
> > Hi All,
>
> > I have developed a WM 5.0 with C# device application. I have around 10
> > forms, this is similar to a wizard, user can navigate forward or backwar=
d in
> > the application, when the user move forward a new instance of a particul=
ar
> > form will be created and used and when the user moves backward the curre=
nt
> > form will be closed. when the user moves forward there is a possibility =
of
> > created more instances of the form repeatedly so after a certain time i =
am
> > getting a Stack Overflow Exception. Please let me know if any solution.
> > Sample code is also welcomed.
>
> > Thanks,- Masquer le texte des messages pr=E9c=E9dents -
>
> - Afficher le texte des messages pr=E9c=E9dents -
|
|
|
|
 |
Madhan

|
Posted: Thu Jan 10 00:26:01 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
Thanks for the reply, Now i am doing as you have said Chris. But i want to
run the application as a single instance as we do in a normal windows
application. In a normal windows application we have MDI Parent - Child. But
in Smart device we dnt have that support so I have used forms and creating
new instance where ever required. Is it possible to run all the instance in a
single instance....
If i am not clear please let me know
Madhan
> Sure, simply keep the Form instances referenced in the application instead
> of creating new ones every time you move forward or back.
>
>
> --
>
> Chris Tacke, eMVP
> Join the Embedded Developer Community
> http://community.opennetcf.com
>
>
> > Hi All,
> >
> > I have developed a WM 5.0 with C# device application. I have around 10
> > forms, this is similar to a wizard, user can navigate forward or backward
> > in
> > the application, when the user move forward a new instance of a particular
> > form will be created and used and when the user moves backward the current
> > form will be closed. when the user moves forward there is a possibility of
> > created more instances of the form repeatedly so after a certain time i am
> > getting a Stack Overflow Exception. Please let me know if any solution.
> > Sample code is also welcomed.
> >
> > Thanks,
>
>
>
|
|
|
|
 |
ctacke/>

|
Posted: Thu Jan 10 09:27:25 CST 2008 |
Top |
PocketPCDev >> Windows Mobile 5.0 in Single Instances
I don't understand the question. Applications *are* single instances, no
matter how many Forms you have. You can only get a second instance by
running the application again, and the CF tries to prevent that for WinMo
anyway.
My guess is that you're seeing each Form in the "running programs" list and
assuming that that means each form is a separate instance. The fact that
they were all created in one application and that you can easily share data
between them should tell you that they are indeed all in one application.
The running programs list simply shows the captions of all top-level
windows. If you don't want a Form to show up, set its caption to an empty
string.
--
Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
> Thanks for the reply, Now i am doing as you have said Chris. But i want to
> run the application as a single instance as we do in a normal windows
> application. In a normal windows application we have MDI Parent - Child.
> But
> in Smart device we dnt have that support so I have used forms and creating
> new instance where ever required. Is it possible to run all the instance
> in a
> single instance....
>
> If i am not clear please let me know
>
> Madhan
>
>
>> Sure, simply keep the Form instances referenced in the application
>> instead
>> of creating new ones every time you move forward or back.
>>
>>
>> --
>>
>> Chris Tacke, eMVP
>> Join the Embedded Developer Community
>> http://community.opennetcf.com
>>
>>
>> > Hi All,
>> >
>> > I have developed a WM 5.0 with C# device application. I have around 10
>> > forms, this is similar to a wizard, user can navigate forward or
>> > backward
>> > in
>> > the application, when the user move forward a new instance of a
>> > particular
>> > form will be created and used and when the user moves backward the
>> > current
>> > form will be closed. when the user moves forward there is a possibility
>> > of
>> > created more instances of the form repeatedly so after a certain time i
>> > am
>> > getting a Stack Overflow Exception. Please let me know if any solution.
>> > Sample code is also welcomed.
>> >
>> > Thanks,
>>
>>
>>
|
|
|
|
 |
|
|