Hi,
How do I get my Windows service opens form in windows application ?

I have tis bit of code in :
protected override void OnStart(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form2());
eventLog1.WriteEntry("Start DONE.");
}
This does not work. When I start my service it just times out.
cheers.
Andrew

Re: windows service opens form in windows application by Marc

Marc
Fri May 09 09:58:55 CDT 2008

> You can Show a form from a windows service by checking the "Allow service to
> interact with desktop" for your service from Windows Service Manager
> Properties window.

Note that this won't work in Vista; in short... don't do it! Have a
separate UI app (pehaps run at user startup) that talks to the service
via IPC, and leave the service to run silent.

Marc