How to use window applications in window services
-
Hi iam new to window services. I developed a window application which is an desktop alret. I need to run this application with a window service. Is there any way to use window applications in window services. Help me out from this. Lakshmi.
-
Hi iam new to window services. I developed a window application which is an desktop alret. I need to run this application with a window service. Is there any way to use window applications in window services. Help me out from this. Lakshmi.
Never tried it, but you can try building you windows application as a class library (dll file) from Project Properties->Application->Output type->Class Library. After that you can add to you windows service as reference, and open the form(s) whenever you want. This way your windows application doesn't have to be at specific path. Hope it helps.
Do your best to be the best
-
Never tried it, but you can try building you windows application as a class library (dll file) from Project Properties->Application->Output type->Class Library. After that you can add to you windows service as reference, and open the form(s) whenever you want. This way your windows application doesn't have to be at specific path. Hope it helps.
Do your best to be the best
Hi I tried the way you said, but iam not getting the result. Is there any other way? Please do inform me. Lakshmi
-
Hi I tried the way you said, but iam not getting the result. Is there any other way? Please do inform me. Lakshmi
Hi, There are several ways try this. 1. First create windows service application(minimal application) 2.
private static Form Form1; protected override void OnStart(string[] args) { //Here call your windows application using process call or using seperate class object. Form1=new Form(); base.OnStart(args); }
Ravi
-
Hi iam new to window services. I developed a window application which is an desktop alret. I need to run this application with a window service. Is there any way to use window applications in window services. Help me out from this. Lakshmi.
-
Hi iam new to window services. I developed a window application which is an desktop alret. I need to run this application with a window service. Is there any way to use window applications in window services. Help me out from this. Lakshmi.
You really shouldn't do this. What you are looking for is a service that has the "Interact with desktop" option selected. This is not recommended practice. Services are intended to be run at the system level, even when someone is not logged in so they aren't supposed to have any UI. To do what you want, you need to create a Windows service and a Windows client application (2 different executables). The client application can run at Windows startup (when a user logs in). When the service needs to display an alert, it needs to inform the client application that there is something to display to the user. There are a lot of different ways to do this, from shared memory to remoting/wcf calls.
Scott.
—In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]