473,609 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP: expose Windows dialog from Windows Service

I am writing a windows service in C#.NET which will manage image capturing
devices, when client connects to the service, at some point the service need
to expose a device dialog to the client for setting some device specific
parameters. According to MSDN docs, classes within the Windows Forms
namespace are not supported for use within a Windows service. So How can I
do that?
Thanks!
HELP: expose Windows dialog from Windows Service
Nov 17 '05 #1
1 2422
Hank,

There is a quick and dirty way, and there is the right way.

If you want, you can mark a service as being able to interact with the
desktop. This is an option on the service that you have to check off. If
you use that, you should be able to use classes from the Windows Forms
namespace in your service.

However, this is the absolutely wrong way to do it.

You said that you have clients that are accessing the service. The
client should use remoting (or some other message/distributed object
technology/method) to make a request to the service and get a response back.
If you need to show a dialog, then the response should indicate what that
you need to show something, and the client will be responsible for showing
that to the user.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Hank" <hy***@communit y.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
I am writing a windows service in C#.NET which will manage image capturing
devices, when client connects to the service, at some point the service
need to expose a device dialog to the client for setting some device
specific parameters. According to MSDN docs, classes within the Windows
Forms namespace are not supported for use within a Windows service. So How
can I do that?
Thanks!
HELP: expose Windows dialog from Windows Service

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1885
by: yoz | last post by:
Hi, I have a windows service in .NET that do not install. After long unit test with NUNIT I realised that in order for the .NET framework seems to have difficulties to choose between 1.0 and 1.1. So I have removed 1.0 from my Windows 2000 machine and did the same on the NT4 box. There may be a way to redirect properly the assembly versions in the ..exe.config file, I don't know the fact is now I have only 1.1 on both machine.
0
1304
by: pithhelmet | last post by:
Hello everyone - I need to create a windows service that will watch for a specific dialog, and when found, send a keypress to the dialog. I have the service working, but when it tries to find the window (dialog) it always comes back with zero. Now - in my test application (not service) it runs fine....
5
2684
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the Administration group (on server side) to have the necessary authorization to start a Windows Service (I don't understand why "Power User" rights are not enough to do the same thing) Although I'm able to start a service using windows 2000 server...
0
1696
by: Anonymous User | last post by:
Hi, I am working on a mobile application that consists of a number of handheld scanners, an Xml Web service and an Oracle 9i database in a highly secure environment. The .Net Compact Framework application running on the scanners executes Web service methods, which in turn execute Oracle database functions. The Web service and the Oracle database are running on separate servers. The Web service uses the Microsoft OLE DB driver for Oracle....
3
2309
by: Eric | last post by:
I have an idea of using a Windows service as a middle tier. Clients will use this middle tier from a small VB application on pc to communicate with a DB server. The middle tier will expose public functions to read and write to the SQL server from the clients. I can’t find any information on how I would actually create public methods in a windows service that can be accessed by a client application. I created a new windows service application...
2
2032
by: Jeffrey Tate via DotNetMonster.com | last post by:
The error is: The proxy settings on this computer are not configured correctly for Web discovery. MSDN states that this is caused by: This error appears in the Add Web Reference dialog box if you are developing on a machine that is behind a firewall and a proxy server has not been explicitly specified for Internet Explorer connections. You need to explicitly specify the address and port of the proxy server on your network in order to make...
12
5322
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
0
1119
by: TonyJ | last post by:
Hello I'm rather new to this with windows service. I want to get a better understanding because I must use it if I don't want to use a console application- I have three important methods below. These are main, constructor for the service class and a method called OnStart. I'm from Sweden so I have tried to translate the name on dialog that I use to start a windows service. I start the service from
5
6192
by: Stefano Tonello | last post by:
Hi all, I need to call windows' "open with" dialog from my C# windows form application. After the user selects application, control must return to me (I have to launch directly the process). I found this solution: http://www.codeproject.com/KB/shell/openwith.aspx but it's not good for me since it will execute the process directly.
0
8145
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8410
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6068
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5526
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4037
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2541
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1690
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.