Creating control panel applets in .NET


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Creating control panel applets in .NET

Hybrid View

  1. #1
    Boris F. Guest

    Creating control panel applets in .NET

    Is there a way to create a control panel applet using vb.net?

    Thanks in advance.

    Boris.



  2. #2
    Jonathan Allen Guest

    Re: Creating control panel applets in .NET

    Good question. However, as things are leaning towards MMC, so I would rather
    have easy access to that instead.

    --
    Jonathan Allen


    "Boris F." <borisf@hotmail.com> wrote in message
    news:3b61187e@news.devx.com...
    > Is there a way to create a control panel applet using vb.net?
    >
    > Thanks in advance.
    >
    > Boris.
    >
    >




  3. #3
    Bill McCarthy Guest

    Re: Creating control panel applets in .NET

    Hi Boris,

    to answer your question, "No" . <g> To write a control panel applet, your
    program has to expose std calls (I think), similar to win32 API. As there is
    no way to do this in managed .net, the only way is to write it in C++ . You
    could write a C++ component that exposed the necessary functions, or geneic
    ones, and then have that have a managed interface, but there is no such
    component as part of dotnet's CLR libraries at present.


    "Boris F." <borisf@hotmail.com> wrote in message
    news:3b61187e@news.devx.com...
    > Is there a way to create a control panel applet using vb.net?
    >
    > Thanks in advance.
    >
    > Boris.
    >
    >




  4. #4
    Rob Teixeira Guest

    Re: Creating control panel applets in .NET


    The "long" answer is that the .NET framework provides a ServiceBase class,
    which you can inherit to create services. You implement the OnStart, OnStop,
    etc. with the functionality you need your service to provide.

    The service you create can be controlled by the Service Manager. The .NET
    framework provides a ServiceController class, which you can use to programatically
    control a service from your own code. This allows you to query a service
    to see its current running state, see if it's busy, etc.

    The final step would be to create a control panel app using this ServiceController.
    A CPL is nothing but a DLL that exposes one single function called CPIApplet
    (which looks like, and basically is, a message handler). Control.exe calls
    into this function any time you need to initialize, terminate, etc., an control
    panel app. Unfortunately, there is no class that acts as a proxy between
    Control.exe and your .NET code like there is for services. (of course, CPL's
    aren't used strictly for working with services either)

    However, it shouldn't be difficult at all for somebody to create this proxy
    in C++ and either expose another callback which your .NET code could use
    (ala Desware tools), or send notification directly to your .NET code via
    delegates.

    On the other hand, services (and other management tasks) are increasingly
    being controlled by Management Console, and .NET does handle MMC integration.
    There's a sample in the beta (which I admitadly haven't actually used yet).

    -Rob

    "Bill McCarthy" <bill_mcc@iprimus.com.au> wrote:
    >Hi Boris,
    >
    >to answer your question, "No" . <g> To write a control panel applet, your
    >program has to expose std calls (I think), similar to win32 API. As there

    is
    >no way to do this in managed .net, the only way is to write it in C++ .

    You
    >could write a C++ component that exposed the necessary functions, or geneic
    >ones, and then have that have a managed interface, but there is no such
    >component as part of dotnet's CLR libraries at present.
    >
    >
    >"Boris F." <borisf@hotmail.com> wrote in message
    >news:3b61187e@news.devx.com...
    >> Is there a way to create a control panel applet using vb.net?
    >>
    >> Thanks in advance.
    >>
    >> Boris.
    >>
    >>

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center