Application has 2 buttons in taskbar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Platform: WinCE 4.2, C#

I am writing wizard based kiosk application. I have a class called Engine
which handles the creation, destruction and displaying of the wizard forms as
the user navigates through the wizard.
The void Main() method is in the Engine class (the Engine class is not a
System.Windows.Forms.Form derived class). Inside Main() I call
Application.Run(System.Windows.Forms.Form formStart). This starts the
applications message loop and displays the first wizard form.
At this point the CE device's taskbar will be displaying 1 button for my
application.
If the user then navigates to the next screen - formNext - I would like to
be able to Dispose formStart and create formNext. I cannot do this because if
formStart is Disposed the application shuts down. So I am forced to keep
formStart around AND while I create the formNext.
At this point there will be 2 taskbar buttons - 1 for formStart and 1 for
formNext. In this way during execution my application will always have 2
taskbar buttons.

I want to have just 1 taskbar button for the application.
How can I achieve this?

TIA

Mark
 
set FormNext's caption to empty string.

Darren Shaffer
Principal Architect
Connected Innovation
 
In this application none of the forms have titlebars , maximize/minimize
buttons, control boxes or borders. All the forms are in the maximized state.
The text property is not set.
 
Also consider this solution. Create the main form (a container for
forms) as fullscreen: without title, minimize/maximize buttons, etc. All
your newly created forms must have .Parent to this form:

FirstForm form = new FirstForm();
form.Parent = this;
form.Show();

It should give you only one form in the taskbar and accurate switching
(without unexpected flickers) between all child forms.

Hope this help,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
I found that if I call formStart.Hide() then there will only be one taskbar
button.
Your suggestion to make the subsequent forms children of formStart is also
something that I may try out.
Thanks,
Mark
 
Back
Top