Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is it possible to open windows form in windows services in vb.net? and how?

there's even an example in the help file.
Posted
Updated 29-Apr-11 7:19am
v2
Comments
Manfred Rudolf Bihy 29-Apr-11 11:30am    
"There is even an example in the help file"

And what happened when you tried that example out?
What problems are you experiencing.

No. If an application requires an interface, you can't open it from a Windows service (at least not in Vista/Windows 7). In XP (and earlier), you can set the service to "interact with the desktop", and even then, that will only work when a user is logged in.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 29-Apr-11 22:39pm    
Sure, a 5.
--SA
Even if it were possible to open a window from a windows service, please heed my advice:

  1. Don't do it!
  2. Don't even think about doing it.


A windows service can always run even when no user is logged into the system. So what use is it to open a window when nobody is logged on to see it.

Do this instead:

Have a little background application running which lives in the system tray and is started when the user logs in. This application can be the front end to the service and display all kinds of stuff. Make sure though that the user can configure how invasive this application behaves.

I know I alway get pi**ed when something pops up and distracts me form what I'm currently working on.

Best Regards,

-MRB
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Apr-11 22:40pm    
I wish you could tell it them all :-) my 5.
--SA

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