Application should not show up in TaskBar

A

ajit goel

Hi;

We are developing an application which consists of many forms. When
the user navigates from one form to another form, both the forms show
up in the TaskBar. Due to this he can go to the taskbar and navigate
to the first form. I would like to disable this.

How can I make my application to not appear in the taskbar?? Comments
and suggestions are highly welcome.

Kind Regards;

Ajit Goel
 
D

Daniel Moth

Setting the Form.Text to String.Empty makes it not appear in the taskbar.
Search the archives as this has been discussed in the past.
Also the latest MSDN mag (available online) discusses an alternative
solution.

Cheers
Daniel
 
P

Peter Foot [MVP]

Either set your "background" form invisible when you launch the new form, or
set it's Text property to "".
The running programs list is created from the window titles of all visible
top level windows.

Peter
 
G

Glyn Meek

Ajit...this is the method I use to 'bracket' each call to a new form
(.frm)...you have to get rid of the form name before you show it,otherwise
each active form's name shows up in the running programs list. This
technique avoids that and only leaves the main program's original name up
there. The variable MyAppName holds the name of the application, but you
could just as easily use a literal here.

Text = ""

frm.ShowDialog()

Text = MyAppName
 
A

ajit goel

Hi;

Many Thanks for all your kind replies and time. However the situation
for us is a bit different.

We have a FormFactory class which is responsible for creating forms,
caching and closing them. We are all averse to changing this class.
This FormFactory does not hide the parent form when a new form is
opened instead it opens the new form on top of the parent form. Due to
this, various forms show up in the form of stack in the TaskBar.

What we are looking out for is a kind of a property which we can
implement for each form, something like "ShowInTaskBar" property as in
Windows Application. If the ShowInTaskBar property is false for a form
it will not show up in the taskbar else it will show up.

Any pointers and suggestions on how to go about implementing this are
highly welcome.

Kind Regards;

Ajit Goel
 
C

Chris Tacke, eMVP

Add a property to each Form - call it FormText. In it store the desired
Form Text. When you want to "hide" the form, set it's Text property to "".
Then you want it to show up, set it back to the FormText value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top