Groups | Blog | Home
all groups > dotnet framework > april 2008 >

dotnet framework : windows service opens form in windows application


Andrew
4/24/2008 6:48:00 AM


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
AddThis Social Bookmark Button