Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

How can I raise WinForm from WinService ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bnaya - 23 Dec 2004 07:42 GMT
How can I raise WinForm from WinService ?
I cannot use remoting because i need the WinForm on the same process as the
Win Service.

I tried the followings:

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

and

MyForm m_frmDetails = new MyForm();
Application.Run(m_frmDetails);
Chris, Master of All Things Insignificant - 23 Dec 2004 20:03 GMT
You can not open a winform from a winservice w/o remoting.  I looked into it
a while ago and it talks about it somewhere in the help file.

Chris

> How can I raise WinForm from WinService ?
> I cannot use remoting because i need the WinForm on the same process as
[quoted text clipped - 9 lines]
> MyForm m_frmDetails = new MyForm();
> Application.Run(m_frmDetails);
Steven Cheng[MSFT] - 24 Dec 2004 04:54 GMT
Hi Bnaya,

The windows service is running in it's own service account and which has it
own desktop. So if we show any UI in the windows service, that' won't be
visible to the currently logon users since the UI are all in the servic'e
desktop. In addition, by default the NTService is non-interacivable with
desktop unless we config it running under LOCALSYSTE and enable the
interactive with desktop.  Anyway,  it's not recommended to directly
dealing with UI in windows service. I think Chris's suggestion on let a
remote client show a UI and communicate with the serivice via any other
means such as remoting or sockets maybe a reasonable way.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.