Windows Service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stanley

    #1

    Windows Service

    Hi everyone! I can create Windows Service in VB .Net 2003 professional.
    The problem is that when I try to show up a form in Service Start up
    event, the form always show up and become stop responsible! Any idea?

    Regards,
    Stanley

  • Ray Cassick

    #2
    Re: Windows Service

    Do not show forms from a service. Services should never interact with the
    desktop.


    "Stanley" <xstanley@gmail .com> wrote in message
    news:1117857341 .720768.252750@ g47g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi everyone! I can create Windows Service in VB .Net 2003 professional.
    > The problem is that when I try to show up a form in Service Start up
    > event, the form always show up and become stop responsible! Any idea?
    >
    > Regards,
    > Stanley
    >[/color]


    Comment

    • Stanley

      #3
      Re: Windows Service

      Thanks for reply! You mean that it's not impossible to make a windows
      service interact with desktop?? I don't think so! Please help to with
      the code, I think it's possible!!

      Thanks again!

      Comment

      • Thorsten Doerfler

        #4
        Re: Windows Service

        Stanley schrieb:[color=blue]
        > Thanks for reply! You mean that it's not impossible to make a windows
        > service interact with desktop?? I don't think so! Please help to with
        > the code, I think it's possible!![/color]

        It's possible, but it's bad design. Services can interact with the
        desktop, but to do so, they have to run with the LocalSystem-Account.
        This one can do everything with your system. The service window will
        be shown at the users desktop and so, it can receive window messages
        as any other desktop window. This can be used to attack the users PC.
        Also, if your service runs under WinXP with fast user switching, the
        service window will only be shown to the first logged on user.

        The better approach is a separate client application, which runs with
        user privileges and connects to your service through TCP-Sockets for
        example.

        Thorsten Dörfler
        --
        vb-hellfire - einfach anders

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Windows Service

          "Stanley" <xstanley@gmail .com> schrieb:[color=blue]
          > I can create Windows Service in VB .Net 2003 professional.
          > The problem is that when I try to show up a form in Service Start up
          > event, the form always show up and become stop responsible![/color]

          In addition to the other replies:

          <URL:http://www.google.to/groups?selm=%24 9uYzKMtEHA.2896 %40cpmsftngxa06 .phx.gbl>

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://classicvb.org/petition/>

          Comment

          • Stanley

            #6
            Re: Windows Service

            Ok, thanks all! ;-)

            Comment

            Working...