473,804 Members | 3,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you create a windows service property sheet?

In C++ we had the ability to create a property page that could be merged
into an existing property sheet to provide customization inputs for users.
Can anyone point me to an example of how to do this in C#? I am creating a
windows service which has dynamic parameters that the user can change.
Instead of creating an administration application I would like to include
the parameters in a property page and have it merged with the default
property sheet provided by the windows service control manager. Microsoft
does this same sort of thing (probably using MFC) with their SNMP service in
XP. If you look at the properties of this service you will see extra tabbed
pages that contain configuration params that the user can change. This is
exactly what I am trying to accomplish in C#.

Any help or guidance would be greatly appreciated!

Thanks,
PJ
Nov 15 '05 #1
2 6180
I hate to say it, but it's almost not worth it.
You can use Interop attributes to recreate the COM property page interfaces
and implement them (there's no pre-compiled TLB that i know of). The
interfaces themselves aren't that bad - i've done this before, both in
VB(5/6) and .NET, however, windows is expecting to see a dialog resource...
and you aren't going to have fun providing that in C#.

My suggestion is to create a seperate GUI and use the ServiceControll er
class to manipulate your service, or use the ServiceControll er class in
conjunction with the MMC classes to create an MMC snap-in.

If you "REALLY" have to provide that property page, then I suggest using
MC++ instead.

-Rob Teixeira [MVP]

"PJ Olson" <pe*****@sux.co m> wrote in message
news:e%******** ********@TK2MSF TNGP11.phx.gbl. ..
In C++ we had the ability to create a property page that could be merged
into an existing property sheet to provide customization inputs for users.
Can anyone point me to an example of how to do this in C#? I am creating a
windows service which has dynamic parameters that the user can change.
Instead of creating an administration application I would like to include
the parameters in a property page and have it merged with the default
property sheet provided by the windows service control manager. Microsoft
does this same sort of thing (probably using MFC) with their SNMP service in XP. If you look at the properties of this service you will see extra tabbed pages that contain configuration params that the user can change. This is
exactly what I am trying to accomplish in C#.

Any help or guidance would be greatly appreciated!

Thanks,
PJ

Nov 15 '05 #2
I was afraid of that. I think I will take your advice and create my own GUI.

Thanks,
PJ
"Rob Teixeira [MVP]" <RobTeixeira@@m sn.com> wrote in message
news:O7******** ******@TK2MSFTN GP10.phx.gbl...
I hate to say it, but it's almost not worth it.
You can use Interop attributes to recreate the COM property page interfaces and implement them (there's no pre-compiled TLB that i know of). The
interfaces themselves aren't that bad - i've done this before, both in
VB(5/6) and .NET, however, windows is expecting to see a dialog resource... and you aren't going to have fun providing that in C#.

My suggestion is to create a seperate GUI and use the ServiceControll er
class to manipulate your service, or use the ServiceControll er class in
conjunction with the MMC classes to create an MMC snap-in.

If you "REALLY" have to provide that property page, then I suggest using
MC++ instead.

-Rob Teixeira [MVP]

"PJ Olson" <pe*****@sux.co m> wrote in message
news:e%******** ********@TK2MSF TNGP11.phx.gbl. ..
In C++ we had the ability to create a property page that could be merged
into an existing property sheet to provide customization inputs for users. Can anyone point me to an example of how to do this in C#? I am creating a windows service which has dynamic parameters that the user can change.
Instead of creating an administration application I would like to include the parameters in a property page and have it merged with the default
property sheet provided by the windows service control manager. Microsoft does this same sort of thing (probably using MFC) with their SNMP service
in
XP. If you look at the properties of this service you will see extra

tabbed
pages that contain configuration params that the user can change. This

is exactly what I am trying to accomplish in C#.

Any help or guidance would be greatly appreciated!

Thanks,
PJ


Nov 15 '05 #3

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

Similar topics

2
2706
by: Sharon | last post by:
I've had an Access 2000 app running successfully for many months on both Windows XP and Windows 2000. Recently when my Windows 2000 users call a particular report, they get first a dialog requesting a "Replace" parameter. If the user clicks OK, the report opens, but only displays #Error. When the user tries to close the report, he is next presented with the choice of halting the code in break mode or not. Regardless of his choice, the app...
7
8875
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
3
14966
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim swLog As StreamWriter = File.CreateText("C:\myLog.txt") swLog.WriteLine("My Windows Service has just started.") swLog.Close() : swLog.Flush() End Sub
3
5218
by: Miriam | last post by:
Hello, I created a Windows Service in VB.NET, which is to purge files periodically in the local system and also in the shared network drive. Here is my problem: 1. If I set the “Account” property of ServiceProcessInstaller to “Local Service” or to “NetWorkService”, it won’t work for both local and network shared directories. (I use log on as this account “NT AUTHORITY\LocalService” for “Local Service” or “NT...
4
4186
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
12
3721
by: Anil Gupte | last post by:
I wrote my Windows Service first as a regular Windows Exe because it is easier to debug. In that I used AppDir = Application.ExecutablePath.Substring(0, Application.ExecutablePath.LastIndexOf("\")) ' Where this application Excutable sits Now, when I am converting it to a Service, what path can I use? Or can I specify a path in the service to always use as a data path? I would prefer the former because I do not know the layout of...
5
2163
by: tshad | last post by:
I have a Windows Service that I am deploying by setting a Deployment project in my solution. The problem I am having is with the app.config file. This where we store our connection string and folder locations. My development app.config is different from my clients. When I send him an msi file, I have to either add the clients app.config file into my project in 2 locations (as I am running as an exe as well as a
12
3290
by: tekctrl | last post by:
Environment; Win2K PC with 1Gb of RAM and plenty of HD space running Access 2002 Issue; Access presents a blank data entry form in the Forms view when the New Record icon is used. However, it won't allow any fields to have data entered into them. I can edit & save existing records without problem. When I go into the Tables view, I can add records and data ok and save without problem. I go back into the Table and I can see the data. ...
4
15426
by: =?Utf-8?B?Sm9zaW4gSm9obg==?= | last post by:
I could create MS Excel sheet using ASP.NET 2.0 with C# but it is not being created in some systems, following error occurs when the program compiles : Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need.
0
9706
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10569
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...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
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
9140
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 projectplanning, coding, testing, and deploymentwithout 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
7615
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
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

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.