Hey
I want to make a program to run in background but keep its icon in the taskbar and when user clicks on the icon it will show the program?
Thanks :]
Printable View
Hey
I want to make a program to run in background but keep its icon in the taskbar and when user clicks on the icon it will show the program?
Thanks :]
When you say:do you actually mean the big button on the task bar or the little icon in the system tray, i.e. beside the clock? If you mean the system tray then you just add a NotifyIcon to your form, set its Icon property and make it Visible. You can then Hide and Show the form at will.Quote:
keep its icon in the taskbar
I Yes System Tray next to the clock.Quote:
Originally Posted by jmcilhinney
I tried adding a NotifyIcon to the form and I added Me.hide() but that didnt work form still showed?
That would be because you called Me.Hide before the form was shown. You can't hide something that hasn't been shown and if it gets shown after you call Hide then calling Hide is pointless.
If you don't want a form to be displayed when your app is started up then you need to set its WindowState to Minimized and its ShowInTaskbar to False. The form will then not be seen by the user but it is still, strictly speaking, visible. You then handle the Shown event of the form, which is raised AFTER the form has been shown, and call Hide there. Now the form will be truly not visible.