Forms & Service

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

    Forms & Service

    Hi !

    How can I add WindowsForms and Notifyicons to my Service ?

    Thanks !

    Christoph


  • One Handed Man \( OHM - Terry Burns \)

    #2
    Re: Forms & Service

    Add a reference to the System.Windows. Forms dll, and then use the imports
    System.Windows. Forms

    --

    OHM ( Terry Burns )
    . . . One-Handed-Man . . .

    Time flies when you don't know what you're doing

    "Christoph Duesmann" <c.duesmann@web .de> wrote in message
    news:ueHNkw5cEH A.4004@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi !
    >
    > How can I add WindowsForms and Notifyicons to my Service ?
    >
    > Thanks !
    >
    > Christoph
    >
    >[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Forms &amp; Service

      * "Christoph Duesmann" <c.duesmann@web .de> scripsit:[color=blue]
      > How can I add WindowsForms and Notifyicons to my Service ?[/color]

      Don't do that. Instead, create a separate Windows Forms application
      that communicates with the service using remoting or sockets. That's
      the recommended way.

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

      Comment

      • One Handed Man \( OHM - Terry Burns \)

        #4
        Re: Forms &amp; Service

        Why cant you do it this way ?

        --

        OHM ( Terry Burns )
        . . . One-Handed-Man . . .

        Time flies when you don't know what you're doing

        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
        news:%23cU$u08c EHA.2724@TK2MSF TNGP12.phx.gbl. ..[color=blue]
        > * "Christoph Duesmann" <c.duesmann@web .de> scripsit:[color=green]
        > > How can I add WindowsForms and Notifyicons to my Service ?[/color]
        >
        > Don't do that. Instead, create a separate Windows Forms application
        > that communicates with the service using remoting or sockets. That's
        > the recommended way.
        >
        > --
        > M S Herfried K. Wagner
        > M V P <URL:http://dotnet.mvps.org/>
        > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>[/color]


        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Forms &amp; Service

          * "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> scripsit:[color=blue]
          > Why cant you do it this way ?[/color]

          You would have to allow user interaction for the service, and this may
          cause some problems... Most services like SQL Server, Apache, ... do it
          the same way, the service and the service controller applications are
          separate applications. If the service controller application crashes,
          the service still runs.

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

          Comment

          • One Handed Man \( OHM - Terry Burns \)

            #6
            Re: Forms &amp; Service

            Thats still not answering my question. You made a statement that this is not
            a good idea to do this, please just simply tell my why not, ( Not that other
            people dont do it this way )

            Thanks

            --

            OHM ( Terry Burns )
            . . . One-Handed-Man . . .

            Time flies when you don't know what you're doing

            "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
            news:uarSPl%23c EHA.3560@TK2MSF TNGP10.phx.gbl. ..[color=blue]
            > * "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> scripsit:[color=green]
            > > Why cant you do it this way ?[/color]
            >
            > You would have to allow user interaction for the service, and this may
            > cause some problems... Most services like SQL Server, Apache, ... do it
            > the same way, the service and the service controller applications are
            > separate applications. If the service controller application crashes,
            > the service still runs.
            >
            > --
            > M S Herfried K. Wagner
            > M V P <URL:http://dotnet.mvps.org/>
            > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>[/color]


            Comment

            • Herfried K. Wagner [MVP]

              #7
              Re: Forms &amp; Service

              * "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> scripsit:[color=blue]
              > Thats still not answering my question. You made a statement that this is not
              > a good idea to do this, please just simply tell my why not, ( Not that other
              > people dont do it this way )[/color]

              Re-read my post, I gave at least one reason there.

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

              Comment

              • Cor Ligthert

                #8
                Re: Forms &amp; Service

                Terry,

                In my opinion is Herfried in this right, in his answer and the explanation
                he told.

                Cor


                Comment

                • Lucas Tam

                  #9
                  Re: Forms &amp; Service

                  "Christoph Duesmann" <c.duesmann@web .de> wrote in news:ueHNkw5cEH A.4004
                  @TK2MSFTNGP10.p hx.gbl:
                  [color=blue]
                  >
                  > How can I add WindowsForms and Notifyicons to my Service ?[/color]

                  You don't.

                  You should create a new windows form apps which edits the parameters of
                  your service.

                  You may want to look into remoting to communicate between the two pieces of
                  software.

                  --
                  Lucas Tam (REMOVEnntp@rog ers.com)
                  Please delete "REMOVE" from the e-mail address when replying.

                  Comment

                  • One Handed Man \( OHM - Terry Burns \)

                    #10
                    Re: Forms &amp; Service

                    This is speculation, not a real scientific reason.

                    --

                    OHM ( Terry Burns )
                    . . . One-Handed-Man . . .

                    Time flies when you don't know what you're doing

                    "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                    news:uwnJfSAdEH A.4092@TK2MSFTN GP11.phx.gbl...[color=blue]
                    > * "One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> scripsit:[color=green]
                    > > Thats still not answering my question. You made a statement that this is[/color][/color]
                    not[color=blue][color=green]
                    > > a good idea to do this, please just simply tell my why not, ( Not that[/color][/color]
                    other[color=blue][color=green]
                    > > people dont do it this way )[/color]
                    >
                    > Re-read my post, I gave at least one reason there.
                    >
                    > --
                    > M S Herfried K. Wagner
                    > M V P <URL:http://dotnet.mvps.org/>
                    > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>[/color]


                    Comment

                    Working...