tags:

views:

1242

answers:

4

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());
}
+8  A: 

You can write a Console Application or a Service or something of that sort. What exactly do you want to do?

Aamir
+1 from me.......
Mitch Wheat
+1  A: 

How about using a console application or a Windows Service?

Mitch Wheat
+4  A: 

(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.

Marc Gravell