Well, it's quite easy to get an application to run in the background. You
simply choose to display no windows. If by "icon in the taskbar" you mean
the half-size ones that appear near the clock, you ask the shell to put one
there. Explorer provides the Shell_NotifyIcon() function to manipulate the
icon's in its tray.
It is an unmanaged sample (i.e. native C++). If you are looking for an
example under .Net, just so say and someone will probably point you in the
right direction.
If you want to go the .NET Windows Forms Application route:
- Set FormBorderStyle to FixedToolWindow. (no alt-tab)
- Set ShowInTaskbar to false
- Set Opacity to 0% and WindowState to Minimized (without opacity 0%, you'll
see the minimzed window)
- Add a notifyIcon to the form, set its icon, and add some sort of
application exiting ability to it.
If you want to go the .NET Windows Forms Application route:
- Set FormBorderStyle to FixedToolWindow. (no alt-tab)
- Set ShowInTaskbar to false
- Set Opacity to 0% and WindowState to Minimized (without opacity 0%, you'll
see the minimzed window)
- Add a notifyIcon to the form, set its icon, and add some sort of
application exiting ability to it.
What if we make the thread in which the form is used (presumably the main thread) a
background thread (by setting the IsBackground property to true)? Will this change again,
if we select the window while running?
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.