-
August 30th, 2011, 09:23 PM
#1
Referencing a Windows Forms App from a Windows Service App
Using VS2010 .NET 4.0
Is there a way to basically merge a Windows Forms Application with a Windows Service Application and allow the passing of parameters on start up to determine if it should start the standard GUI or launch as a system service.
Is that even possible or reasonable?
I'd like to not have to manager two projects xD (would that be the only alternative?)
Thanks,
Zok
-
August 30th, 2011, 09:49 PM
#2
Re: Referencing a Windows Forms App from a Windows Service App
A Service BY DEFAULT can have no USER INPUT, so NO. Of course, you could probably figure out a way to pass parameters to modules, but, I wouldn't bother
-
August 30th, 2011, 10:59 PM
#3
Re: Referencing a Windows Forms App from a Windows Service App
I think you need two projects in one solution one to compile as an exe the other as a service. Both could share one or more of the classes but the programs would be independant of each other.
Always use [code][/code] tags when posting code.
-
August 31st, 2011, 07:09 PM
#4
Re: Referencing a Windows Forms App from a Windows Service App
Thanks to you both. I'ma try DataMiser's solution and see how it goes =)
-
September 2nd, 2011, 12:43 AM
#5
Re: Referencing a Windows Forms App from a Windows Service App
I agree with two different projects as much better and easier than a single.
Although, in Vista/7 it is easy to add a program so that it starts up at the boot screen, provided the user adding it is an admin. In that case a single windows form app will do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|