473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Instead of Control Panel Applet

My C# application is a Windows Service. I have two problems that I
would like to solve in the correct way using C#.NET.

1) There are a number of user settings which I'd like to store in an
XML file. I read these settings each time the service does some work,
then close the file. Should I use the Configuration class to read
this file from my service code?

2) I'd like to give the users a control panel application to change
the settings in a GUI. Well, not an old unmanaged .cpl, but whatever
we're "supposed to" be using now in .NET applications. Is there some
new psuedo-cpl hosting container in .NET that takes the place of what
Control Panel did? If not, how are people providing GUIs for their
users to change service settings?

TIA, Grok
Dec 16 '07 #1
3 2150
Grok,

1) Yes, you should. You should create a custom configuration section
handler if you have some complex data structures that you need to store,
otherwise, you can just add the values you need to the config file for the
executable.

2) There isn't a way to do this from .NET. You can not export functions
from a DLL in .NET, which is what a control panel applet needs. You could
create an unmanaged DLL in an unmanaged language, and then call into a .NET
assembly though.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Grok" <gr**@valhallalegends.comwrote in message
news:0l********************************@4ax.com...
My C# application is a Windows Service. I have two problems that I
would like to solve in the correct way using C#.NET.

1) There are a number of user settings which I'd like to store in an
XML file. I read these settings each time the service does some work,
then close the file. Should I use the Configuration class to read
this file from my service code?

2) I'd like to give the users a control panel application to change
the settings in a GUI. Well, not an old unmanaged .cpl, but whatever
we're "supposed to" be using now in .NET applications. Is there some
new psuedo-cpl hosting container in .NET that takes the place of what
Control Panel did? If not, how are people providing GUIs for their
users to change service settings?

TIA, Grok
Dec 16 '07 #2
On Sun, 16 Dec 2007 15:26:17 -0500, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.comwrote:
>Grok,

2) There isn't a way to do this from .NET. You can not export functions
from a DLL in .NET, which is what a control panel applet needs. You could
create an unmanaged DLL in an unmanaged language, and then call into a .NET
assembly though.
(I accept that control panel is 'out', and only brought it up as an
example)

Given that, what are people doing in .NET to create user GUI to change
settings for a service? Surely, writing a service and then providing
GUI access to its configurable values is not uncommon.

I'm hesitant to write a simple windows app that will show up on their
start menu as more clutter. Is there another container? Just want to
do the right thing and conform to how the community is doing it.
Dec 16 '07 #3
Grok,

Well, you could create a Microsoft Management Console snap in and then
modify the settings from there. Changing the settings for the config file
doesn't warrant an MMC plug in, IMO, as those plug-ins are meant to really
show more real-time information. If you want to do that, then you will have
to create a remoting endpoing of some kind in your service (using remoting,
WCF, or some other technology/protocol) and then communicate with it from
your plug-in/stand alone program.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Grok" <gr**@valhallalegends.comwrote in message
news:3u********************************@4ax.com...
On Sun, 16 Dec 2007 15:26:17 -0500, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.comwrote:
>>Grok,

2) There isn't a way to do this from .NET. You can not export functions
from a DLL in .NET, which is what a control panel applet needs. You could
create an unmanaged DLL in an unmanaged language, and then call into a
.NET
assembly though.

(I accept that control panel is 'out', and only brought it up as an
example)

Given that, what are people doing in .NET to create user GUI to change
settings for a service? Surely, writing a service and then providing
GUI access to its configurable values is not uncommon.

I'm hesitant to write a simple windows app that will show up on their
start menu as more clutter. Is there another container? Just want to
do the right thing and conform to how the community is doing it.
Dec 16 '07 #4

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

Similar topics

1
by: Vincent Montressor | last post by:
I'm playing around with writing my own panel applets, and I'm trying to figure out how to get my panel applets to be restored when I log in. As an experiment, I'm using the simple clock applet...
1
by: Stuart Roberts | last post by:
I wish to implement a control panel applet for my application, accessed from the standard windows control panel. Is they a simple way of ding this for a C# project? Am I right in thinking that i...
2
by: AKR | last post by:
I have to create control panel applet using C# . I have read in the net that it is not possible using C# . How can i create control panel applet using C# .
1
by: rajani | last post by:
How to create control panel applet in CSharp. I know that a dll renamed as .cpl with cplapplet function exported has to be created which is not possible using csharp. Any help is appreciated. ...
0
by: rajani | last post by:
I have to create a control panel applet for my project using C# . But > i got to know that it is not possible using C# since dll has to > export static entry points. And one of the ways is using...
1
by: yxq | last post by:
I found some delphi code to get control panel applet icon. http://delphi.about.com/library/weekly/aa062403b.htm How to get control panel applet icons using vb.net? Thanks
11
by: yxq | last post by:
Hello I want to retrive the name & Description from a Control Panel Applet(or *.cpl file), how to do? Thanks
7
by: Jay | last post by:
Hey There, I've been trying to see if there is a way to programmatically block, or hide, the Control Panel. Since it is a "Virtual Folder", just blocking an .exe from running doesn't work. Even...
0
by: Steve in Albury | last post by:
How can I show the printers control panel applet from code in dotnet? At present I am just using a System::Diagnostics::Process::Start call to launch control.exe with the parameter printers. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.