Click here to Skip to main content
15,846,342 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a form called form1. i want whenever the program execute the form is invisible.
And by pressing some key combination like (ctrl+j) the form is shown.
please guide in

do we have to load it in system tray or is there any other method ?
plz guide via code.


You can do it this way:

me.ShowInTaskbar = false

HOWEVER, if your app is running, there really should be an indication of it so the user isn't sitting there wondering if it ran.

EDIT ======================

In response to your "I'm not satisfied" statement... You're free to use google, but you'll find that that's the way you hide the application from the taskbar. You're also free to ignore the advice from someone who's been in the business for 30 years, and go ahead and hide your app's button as well as not put an icon in the system tray, but at this point, a question must be raised as to your intent.
Share this answer
dahras 17-Sep-10 1:58am    
plz dont mind, i was just letting u know that that's not d solution to my problem
my thoughts about the invisible form. Code will only execute on the keypress but how would you know if you have focus on the form to execute its event?

I would personally go with system tray option, but I'll give you a google link as your more than likely to learn more from it!

Google Search: system tray
Share this answer
So, yes, you can do it without loading it in the system tray. But, the only reason that I can think of doing this would be for a key in you want a program running that no one knows about that is logging every keystroke...or taking snapshots of the screen periodically.

If that's the case, then I'm definitely not going to tell you how to do it.

Provide a good reason as to why you want to do this and maybe I'll help you out.
Share this answer
You need to register a Windows Hotkey. There is an article on Code Project Simple steps to enable Hotkey and ShortcutInput user control[^].

With respect to making it hidden; I suggest using the System Tray as it is more user friendly. Allowing a user to remember that an App is running and giving them control is part of good design.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900