Hi Everyone,
I'm facing an annoying problem and any help will be most appreciated .
.. .
I have a main application form and its icon is functioning excellent:
it appears both in the taskbar and whenever you switch using the Alt +
Tab keys.
At a certain point of the code I'm creating a new form, using a
different thread for this task in order to prevent 'blinking' until
the new form is created and displayed. The code looks like that:
newFormThread = new Thread(new ThreadStart(CreateNewForm));
newFormThread.Start();
The function 'CreateNewForm' looks as following:
newForm = new NewForm();
// Several 'NewForm' initializations . . .
Application.Run(newForm);
In the 'Load' function of 'NewForm' I also have the following line:
MainApplicationForm.Visible = false;
(So the main application form is hidden and only the new form is
displayed.)
Once I'm done with the new form I'm setting the 'Visible' property of
the main application form to 'true' and it's being displayed again.
Everything is working just fine. However, once the NewForm is
displayed its icon doesn't appear in the task bar. I do have an icon
once I'm using the Alt + Tab keys but this is the main application
icon (I gave the NewForm a different icon in order to try and
isolating the problem).
Can anyone help here?
Many thanks,
Elad