John,
Do you ever wonder how managers become managers? Sometimes when I see
what managers insist upon, I ask the same thing.
But I digress. A windows service can not interact with the desktop by
default. Meaning, it can't use window functions. There is a checkbox which
allows the service to interact with the desktop, but generally, this is a
really bad idea.
Now, you have a Windows Forms app that has the ActiveX control, and
that's ok, because the Windows Forms app is not the service, but rather,
running on the user's desktop. However, if you wanted to create the ActiveX
control in the service app, you shouldn't. COM components are one thing,
but ActiveX are much more than that.
So the question is, do you require the ActiveX control to run in the
service? If so, then yes, the design is wrong. If it only runs in the
Windows Forms app, then you should be ok.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"John F" <jf@rt.comwrote in message
news:89**********************************@microsof t.com...
Hello All,
I have a question about using an ActiveX control with a Windows Servce in
C#. I believe it is not possible to properly setup an ActiveX control in
a
windows service as the particular ActiveX control we're using (GrFinger
for
fingerprint reader)implements several event handlers. It is also my
understanding that there is no Message Pump within a Windows Service. I
suppose I could create my own message pump, but this seems like a really
wrong approach.
Can anyone confirm my views as my supervisor insists this is the way to
code
our current project and I don't want to code down a road that isn't worth
coding down...
My idea is to use a Windows Service with either .NET remoting or Sockets
to
interact with a Windows Forms App (which has the ActiveX on it)
If there is a way to setup an event driven ActiveX in a Windows Service,
please give me suggestions.
Thanks for your time,
John F.