Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

Please tell me asap....How to open Windows Form from a windows Service???

Regards..
Posted
Comments
Slacker007 13-Dec-10 7:47am    
What research have you done so far? Where are you exactly have problems in your application?
jitubhadre 29-Apr-11 11:19am    
Is it possible to open windows form in windows services

1 solution

0) A Windows service has no interface, and therefore cannot have its own forms (if that's what you were intending).

1) You have to set the service to "interact with the windows desktop" to open an external app with a GUI. I then suspect that you would also have to make sure that a user (and maybe even the appropriate user) is logged in, but I'm not entirely sure about that requirement. Another thing to be aware of is that if you want to do that, MOST of the time, the proper method is to put the app into the system tray.
 
Share this answer
 
Comments
Sandeep Mewara 14-Dec-10 0:52am    
Comment from OP:
ya. I have used System.Diagnostics.Process to invoke a process as windows form application is in ".exe" format.
I can see the name of my windows form in the task manager but it is running under the username=system. I think it should run in my logged-in username account.

Plz reply with some sample code.

Regards
ABHISHEK SAXENA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900