Win Service GUI

  • Thread starter Thread starter bnaya
  • Start date Start date
B

bnaya

How can I open WinForm from Windows Service

I was tring the following options but it didn't work for me:

MyForm m_frmDetails = new MyForm();
m_frmDetails.Show();



or

MyForm m_frmDetails = new MyForm();
Application.Run(m_frmDetails);

does anyone know how to do it?

(I cannot use remoting)
 
bnaya said:
How can I open WinForm from Windows Service

I was tring the following options but it didn't work for me:

MyForm m_frmDetails = new MyForm();
m_frmDetails.Show();



or

MyForm m_frmDetails = new MyForm();
Application.Run(m_frmDetails);

does anyone know how to do it?

(I cannot use remoting)

You've have to enable the service to interact with the desktop, which
it doesn't by default. It may work then - but by and large services
really *shouldn't* use the desktop.
 
Hi Bnaya,

Thanks for your posting. Regarding on this question, I've also found your
another thread in this queue
titled:

"How can I raise Winform from WinService"

I've posted my reply there , I'd appreciate if you have a look there. Also,
if you feel it convenient that we continue to discuss in that thread,
please feel free to post there. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top