Normally, a form is not displayed until
Show
or
ShowDialog
is called. The one exception is the main form, which can be minimized but not hidden.
You can write formless applications in VB.Net (probably C# too, but I'm not sure how to do that.) You will need to create a class based on
ApplicationContext
that will act as the application -- this will keep the application running without a primary form. Add a public module with the method
Sub Main
. In the
My Project interface, uncheck "Enable application framework". Select "Sub Main" as the startup object. In
Main
, add the single line
Application.Run
with a new instance of your application context class.
I looked through the Code Project and didn't see any VB articles that demonstrate how to do this. I will work to remedy this lack of information and try to get something posted by the end of the week. In the mean time, try searching the web for "Sub Main" and "ApplicationContext" and see what you can find. If you can translate from C#, this article at CP,
Creating a Tasktray Application[
^] should help a lot.
Added - Article written:
Create A Tray Application In VB.Net[
^]. Let me know if it helps.