Possible Duplicate:
Writing a Windows system tray application with .NET
Hi,
I am programming an application in .NET and I don't want to put it a windows interface.
I remember some time ago I did it with inheriting from the ApplicationContext class but now I can't achieve it.
How I could do it?
Thanks!
Edit: It's an application that is managed by a notify icon. It must appear the icon near the system clock but not a form. I'm doing this:
class Sync : ApplicationContext
{
public Sync()
{
...
}
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Sync());
}
(obsolete now that you've edited the question to state systray; left for reference only)
If you want an exe without any UI (not even a console), but without it being a service etc - then write a windows forms app, but just don't show any forms! The fact that it is a winform app simply means you don't get a console window - but no UI is shown except that which you write. Look at the Main
method (usually in Program.cs
in the VS templates) to see what I mean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With