Re: Forms Creation Question

From: Jan Yeh_eMVP (janyehNO_at_SPAMmail2000.com.tw)
Date: 11/16/04


Date: Tue, 16 Nov 2004 15:09:51 +0800

My way is to set the unused forms as hidden by Form.Hide().
ex. Set Form2 as active form
    Form2.Show()
    Form1.Hide()
and switch back to Form1
    Form1.Show()
    Form2.Hide()

This can solve your first problem...
However, you better watch out when you switch between forms,
Form.Activated event will be triggered.

-- 
Best Regards,
Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
http://blog.mvpcn.net/janyeh
"Peter Foot [MVP]" <feedback@no-spam.inthehand.com> ¼¶¼g©ó¶l¥ó·s»D:%23eRqRa2yEHA.3996@TK2MSFTNGP10.phx.gbl...
> Because the task manager on Pocket PC doesn't actually enumerate the 
> processes on the device, it merely creates a list of the captions of all 
> the visible top level forms. You can work around this by setting the 
> caption to nothing "" when in the background so only your current form 
> will appear.
>
> Peter
>
> -- 
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> "Aaron" <ABieberitz@charter.net> wrote in message 
> news:10picnbqhrgq938@corp.supernews.com...
>> OK, while that makes sense, I still don't understand why each instance of 
>> a
>> form creates a separate task on a PPC.  I have an Ipaq 5555 and using 
>> ITask
>> I show tons of instances of my app opened, only because a bunch of forms
>> were created when I launched them throughout the process of testing my 
>> app.
>> I was always use to eMbedded Visual Basic which created only one instance 
>> of
>> your app, regardless of how many forms were launched.  I need to know if
>> there is a way to rectify this problem as my client will not be happy to 
>> see
>> this type of thing happening.
>>
>> Another question is why when I call this code to close out my form:
>>
>> frmPSA.GetInstance().Close();
>>
>> it does nothing, essentially locking my app up, but not literally, and I
>> have even added the following code to my forms since they use the 
>> singleton
>> method:
>> protected override void OnClosed(EventArgs e)
>>
>> {
>>
>> base.OnClosed(e);
>>
>> instance = null;
>>
>> }
>>
>> can anyone give me assistance on either of these matters?
>>
>> "Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in 
>> message
>> news:uQIgL11yEHA.1932@TK2MSFTNGP09.phx.gbl...
>>> Default instances of Forms do not exist. You must create an instance of 
>>> a
>>> Form before showing it.
>>>
>>> -- 
>>> Tim Wilson
>>> .Net Compact Framework MVP
>>>
>>> "Aaron" <ABieberitz@charter.net> wrote in message
>>> news:10pi8t5n21ldd72@corp.supernews.com...
>>> > I need to know whether or not every form for a project in all 
>>> > namespaces
>>> is
>>> > created when an application is launched or not.  I'm using the 
>>> > singleton
>>> > method now for my forms and  I'm not sure why, but sometimes the
>> emulator
>>> is
>>> > crashing saying it's low on memory when I try opening and closing
>>> > forms...still haven't pinpointed exactly what situation it happens
>> under,
>>> > but if I know that the forms are all created and reside in memory at
>>> > startup, this would help diagnose the potential problem.  Once I get 
>>> > the
>>> > answer to this question, I'll probably have more until I get this 
>>> > forms
>>> > thing down in C#, but I need to know this first.
>>> >
>>> > Thanks
>>> >
>>> >
>>>
>>>
>>
>>
>
> 


Relevant Pages

  • Re: Doing projects with Framework v1.0 in VS 2003?
    ... > So, if I got that right, the app will run on the 1.0 framework if compiled ... > with that switch. ... Herfried K. Wagner [MVP] ...
    (microsoft.public.dotnet.framework)
  • Re: Doing projects with Framework v1.0 in VS 2003?
    ... > So, if I got that right, the app will run on the 1.0 framework if compiled ... > with that switch. ... Herfried K. Wagner [MVP] ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Hiding VIO window screensize changes?
    ... But this isn't about diving into Dive, and the original app (over ... Prefix "1": type MyApp.EXE in a fullscreen CMD.EXE session ... use a regular WPS file object representing MyApp.EXE (VIO) ... to be a minimized switch to 40x25, ...
    (comp.os.os2.programmer.misc)
  • Re: [opensuse] KDE4.x.x Activities
    ... the leaving that app open switch back to your other activity via the ... Maybe the KDE team need a bit of a pokingto jiffy them up a little on ... SuSE Linux 10.3-Alpha3. ...
    (SuSE)
  • Re: VC++6 About Box Cancel Button
    ... > building a dialog-based app and used it for something ... > else, you must create an OnClicked handler for it, and this handler must call ... > Resources tab and expanded the resources, or are you editing the .rc file directly. ... > on my MVP Tips site). ...
    (microsoft.public.vc.mfc)