473,412 Members | 4,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

A problem with application icon taskbar.

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
Nov 16 '05 #1
2 2543
Hi,

Are you sure that additional thread with "Application.Run(...)"
is really needed for your application?
I think that simple "newForm.Show()" (eventually from newFormThread
thread) should do the job.

To see newForm in "Alt+Tab" list assure that its "ShowInTaskbar"
property is set to "true".

Regards

Marcin
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

Nov 16 '05 #2
Marcin Grz?bski <mg*******@taxussi.no.com.spam.pl> wrote in message news:<ch**********@nemesis.news.tpi.pl>...
Hi,

Are you sure that additional thread with "Application.Run(...)"
is really needed for your application?
I think that simple "newForm.Show()" (eventually from newFormThread
thread) should do the job.

To see newForm in "Alt+Tab" list assure that its "ShowInTaskbar"
property is set to "true".

Regards

Marcin


Hi Marcin,

Thanks for your quick answer . . .

I understand I should use a different thread but instead of
'Application.Run' I should use the 'newForm.Show' method. Am I
correct?

Well, I tried doing that but for some reason the NewForw is not
displayed at all! I tried using the 'newForm.ShowDialog' and got the
same results - NewForm is displayed but no icon in the taskbar.

Any other thoughts?

Thanks,
Elad
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Huw Lloyd | last post by:
I am trying to develop a small VB.NET server application that runs in the background and places an icon in the Windows Taskbar. When the user double clicks on the taskbar icon the application...
4
by: Beenish Sahar Khan | last post by:
I want to start my application so that its notify icon is added to the system tray, i don't want to show any starting form. I want user to interact through the notify icon...just like MSN. Is there...
0
by: Jean Bredeche | last post by:
Hi: My application creates multiple forms, all of which appear in the taskbar. Because I have my Windows XP configured to "Group similar taskbar buttons", the multiple forms get put into the...
4
by: Michael Yao | last post by:
Can anybody provide an example of how to program an application that can run in the background and show only the icon on the taskbar?
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
0
by: Mike | last post by:
Greetings, I have an application that is launched and controlled (hide or show) via DDE messages from another application. The first time the application is launched it shows as it should and...
2
by: flaper87 | last post by:
Hi everybody!!!! I am developing an aplication, and i want it to stay on the system tray, i found out how to put the icon, but i can minimize it there, What do i have to do?, I'm using python(of...
17
by: Bodyboarder20 | last post by:
Hello! So im working on an applicaiton that all pretty much sits on a single form. When the application completes a task, I'd like it to use FlashWindow() to notify the user that it has...
2
by: plevintampabay | last post by:
I have a borderless form in C#. The form has an icon specified in its properties and I also have the same icon specified for the project in the project properties. When I had a border on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.