Can services have forms?

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

    #1

    Can services have forms?

    I thought that I read somewhere that services don't (or can't) have forms.

    Is that true?



  • Mr. Arnold

    #2
    Re: Can services have forms?


    "jim" <jim@yourpc.edu wrote in message
    news:nkQji.2969 7$19.19186@bign ews5.bellsouth. net...
    >I thought that I read somewhere that services don't (or can't) have forms.
    >
    Is that true?
    A service doesn't use forms, because the service is meant to run unattended
    once it's started/executed, with no user interfacing.

    But a Windows desktop application using a form can communicate with with a
    service application, just like you see a personal firewall UI that
    communicates with its FW service application.

    Comment

    • jim

      #3
      Re: Can services have forms?


      "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
      news:%23NrZL$Mw HHA.312@TK2MSFT NGP04.phx.gbl.. .
      >
      "jim" <jim@yourpc.edu wrote in message
      news:nkQji.2969 7$19.19186@bign ews5.bellsouth. net...
      >>I thought that I read somewhere that services don't (or can't) have forms.
      >>
      >Is that true?
      >
      A service doesn't use forms, because the service is meant to run
      unattended once it's started/executed, with no user interfacing.
      >
      But a Windows desktop application using a form can communicate with with
      a service application, just like you see a personal firewall UI that
      communicates with its FW service application.
      Do you know of any examples of this that I can learn from?


      Comment

      • Chris Mullins [MVP]

        #4
        Re: Can services have forms?

        "jim" <jim@yourpc.edu wrote in message
        news:nkQji.2969 7$19.19186@bign ews5.bellsouth. net...
        >I thought that I read somewhere that services don't (or can't) have forms.
        >
        Is that true?
        Nope, not true at all. A Windows Service can have all the forms it want.
        There's even a handly little "Allow Service to Interact with Desktop" check
        box you can explore in the service admin screen.

        Now, as to the wisdom of having a Windows Service do Forms, that's another
        story. If you go this route, you need to have a good answer for "What to do
        if nobody is logged in?", and all of the edge cases around that.

        Most people solve this by having the Service not have any Forms code, and
        instead use a Remoting Proxy and an Admin Application. This seems to work
        better. Just go look up "Remoting" and you'll find a number of examples all
        over CodeProject.

        If you want forms in your service simply for the sake of debugging, you can
        take the hybrid approach:


        The approach I talk about there works for Console and WinForms apps.

        --
        Chris Mullins, MCSD.NET, MCPD:Enterprise , Microsoft C# MVP
        Find your domain name at HugeDomains. Start using this domain right away.



        Comment

        • Mr. Arnold

          #5
          Re: Can services have forms?


          "jim" <jim@yourpc.edu wrote in message
          news:OiUji.2979 1$19.9526@bigne ws5.bellsouth.n et...
          >
          "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
          news:%23NrZL$Mw HHA.312@TK2MSFT NGP04.phx.gbl.. .
          >>
          >"jim" <jim@yourpc.edu wrote in message
          >news:nkQji.296 97$19.19186@big news5.bellsouth .net...
          >>>I thought that I read somewhere that services don't (or can't) have
          >>>forms.
          >>>
          >>Is that true?
          >>
          >A service doesn't use forms, because the service is meant to run
          >unattended once it's started/executed, with no user interfacing.
          >>
          >But a Windows desktop application using a form can communicate with
          >with a service application, just like you see a personal firewall UI that
          >communicates with its FW service application.
          >
          Do you know of any examples of this that I can learn from?
          This is a C# example and everything that's being done in C# as far as using
          the namespace can be done in VB.NET as well.



          You can also issue custom commands to the service.



          It's a one way communications, but you could create trigger files or other
          means in the service to let the Windows application know that an event has
          happened, as an example.

          Comment

          • Mr. Arnold

            #6
            Re: Can services have forms?

            Oh, one other thing I like to do when debugging a service application,
            particularly, when debugging a library that I have written that the service
            is using and I need to send messages to help in the debugging is do NET Send
            commands back to the workstation the service is running on. The Windows
            Messenger service must be enabled on the machine so that messages can be
            seen, with a popup message window being displayed.

            Comment

            • jim

              #7
              Re: Can services have forms?


              "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
              news:OcdcF9QwHH A.3684@TK2MSFTN GP02.phx.gbl...
              >
              "jim" <jim@yourpc.edu wrote in message
              news:OiUji.2979 1$19.9526@bigne ws5.bellsouth.n et...
              >>
              >"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
              >news:%23NrZL$M wHHA.312@TK2MSF TNGP04.phx.gbl. ..
              >>>
              >>"jim" <jim@yourpc.edu wrote in message
              >>news:nkQji.29 697$19.19186@bi gnews5.bellsout h.net...
              >>>>I thought that I read somewhere that services don't (or can't) have
              >>>>forms.
              >>>>
              >>>Is that true?
              >>>
              >>A service doesn't use forms, because the service is meant to run
              >>unattended once it's started/executed, with no user interfacing.
              >>>
              >>But a Windows desktop application using a form can communicate with
              >>with a service application, just like you see a personal firewall UI
              >>that communicates with its FW service application.
              >>
              >Do you know of any examples of this that I can learn from?
              >
              This is a C# example and everything that's being done in C# as far as
              using the namespace can be done in VB.NET as well.
              Are you aware that you are in a VB.Net newsgroup?



              Comment

              • Heikki Leivo

                #8
                Re: Can services have forms?

                Are you aware that you are in a VB.Net newsgroup?

                Are you aware that there is practically no difference beetween C# and
                VB.Net?


                Comment

                • Mr. Arnold

                  #9
                  Re: Can services have forms?


                  "jim" <jim@yourpc.edu wrote in message
                  news:xWZji.7385 $ca.7219@bignew s4.bellsouth.ne t...
                  >
                  "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                  news:OcdcF9QwHH A.3684@TK2MSFTN GP02.phx.gbl...
                  >>
                  >"jim" <jim@yourpc.edu wrote in message
                  >news:OiUji.297 91$19.9526@bign ews5.bellsouth. net...
                  >>>
                  >>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                  >>news:%23NrZL$ MwHHA.312@TK2MS FTNGP04.phx.gbl ...
                  >>>>
                  >>>"jim" <jim@yourpc.edu wrote in message
                  >>>news:nkQji.2 9697$19.19186@b ignews5.bellsou th.net...
                  >>>>>I thought that I read somewhere that services don't (or can't) have
                  >>>>>forms.
                  >>>>>
                  >>>>Is that true?
                  >>>>
                  >>>A service doesn't use forms, because the service is meant to run
                  >>>unattended once it's started/executed, with no user interfacing.
                  >>>>
                  >>>But a Windows desktop application using a form can communicate with
                  >>>with a service application, just like you see a personal firewall UI
                  >>>that communicates with its FW service application.
                  >>>
                  >>Do you know of any examples of this that I can learn from?
                  >>
                  >This is a C# example and everything that's being done in C# as far as
                  >using the namespace can be done in VB.NET as well.
                  >
                  Are you aware that you are in a VB.Net newsgroup?
                  Yes, I am aware I am in a VB NG. However, most examples of things are in C#
                  ..Net. You can search Google and see if you can find some examples in VB.

                  Once again, there is no difference between C# and VB.Net. The only
                  difference between the two languages are syntactical. You should be able to
                  take the C# example and come out with a VB example doing the same thing.



                  Comment

                  • Michel Posseth  [MCP]

                    #10
                    Re: Can services have forms?

                    I comunicate with a few of my services with remoting

                    this might be an option for you to


                    Michel


                    "Mr. Arnold" <MR. Arnold@Arnold.c omschreef in bericht
                    news:OcdcF9QwHH A.3684@TK2MSFTN GP02.phx.gbl...
                    >
                    "jim" <jim@yourpc.edu wrote in message
                    news:OiUji.2979 1$19.9526@bigne ws5.bellsouth.n et...
                    >>
                    >"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                    >news:%23NrZL$M wHHA.312@TK2MSF TNGP04.phx.gbl. ..
                    >>>
                    >>"jim" <jim@yourpc.edu wrote in message
                    >>news:nkQji.29 697$19.19186@bi gnews5.bellsout h.net...
                    >>>>I thought that I read somewhere that services don't (or can't) have
                    >>>>forms.
                    >>>>
                    >>>Is that true?
                    >>>
                    >>A service doesn't use forms, because the service is meant to run
                    >>unattended once it's started/executed, with no user interfacing.
                    >>>
                    >>But a Windows desktop application using a form can communicate with
                    >>with a service application, just like you see a personal firewall UI
                    >>that communicates with its FW service application.
                    >>
                    >Do you know of any examples of this that I can learn from?
                    >
                    This is a C# example and everything that's being done in C# as far as
                    using the namespace can be done in VB.NET as well.
                    >

                    >
                    You can also issue custom commands to the service.
                    >

                    >
                    It's a one way communications, but you could create trigger files or
                    other means in the service to let the Windows application know that an
                    event has happened, as an example.
                    >

                    Comment

                    • Blake

                      #11
                      Re: Can services have forms?

                      "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                      news:u2IHXYUwHH A.1184@TK2MSFTN GP04.phx.gbl...
                      >
                      "jim" <jim@yourpc.edu wrote in message
                      news:xWZji.7385 $ca.7219@bignew s4.bellsouth.ne t...
                      >>
                      >"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                      >news:OcdcF9QwH HA.3684@TK2MSFT NGP02.phx.gbl.. .
                      >>>
                      >>"jim" <jim@yourpc.edu wrote in message
                      >>news:OiUji.29 791$19.9526@big news5.bellsouth .net...
                      >>>>
                      >>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                      >>>news:%23NrZL $MwHHA.312@TK2M SFTNGP04.phx.gb l...
                      >>>>>
                      >>>>"jim" <jim@yourpc.edu wrote in message
                      >>>>news:nkQji. 29697$19.19186@ bignews5.bellso uth.net...
                      >>>>>>I thought that I read somewhere that services don't (or can't) have
                      >>>>>>forms.
                      >>>>>>
                      >>>>>Is that true?
                      >>>>>
                      >>>>A service doesn't use forms, because the service is meant to run
                      >>>>unattende d once it's started/executed, with no user interfacing.
                      >>>>>
                      >>>>But a Windows desktop application using a form can communicate with
                      >>>>with a service application, just like you see a personal firewall UI
                      >>>>that communicates with its FW service application.
                      >>>>
                      >>>Do you know of any examples of this that I can learn from?
                      >>>
                      >>This is a C# example and everything that's being done in C# as far as
                      >>using the namespace can be done in VB.NET as well.
                      >>
                      >Are you aware that you are in a VB.Net newsgroup?
                      >
                      Yes, I am aware I am in a VB NG. However, most examples of things are in
                      C# .Net. You can search Google and see if you can find some examples in
                      VB.
                      >
                      Once again, there is no difference between C# and VB.Net. The only
                      difference between the two languages are syntactical. You should be able
                      to take the C# example and come out with a VB example doing the same
                      thing.
                      >
                      >
                      >
                      Unless you need pointers or anonymous delegates :-)

                      Comment

                      • jim

                        #12
                        Re: Can services have forms?


                        "Blake" <no@emailwrot e in message
                        news:u3vytzUwHH A.312@TK2MSFTNG P04.phx.gbl...
                        "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                        news:u2IHXYUwHH A.1184@TK2MSFTN GP04.phx.gbl...
                        >>
                        >"jim" <jim@yourpc.edu wrote in message
                        >news:xWZji.738 5$ca.7219@bigne ws4.bellsouth.n et...
                        >>>
                        >>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                        >>news:OcdcF9Qw HHA.3684@TK2MSF TNGP02.phx.gbl. ..
                        >>>>
                        >>>"jim" <jim@yourpc.edu wrote in message
                        >>>news:OiUji.2 9791$19.9526@bi gnews5.bellsout h.net...
                        >>>>>
                        >>>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                        >>>>news:%23NrZ L$MwHHA.312@TK2 MSFTNGP04.phx.g bl...
                        >>>>>>
                        >>>>>"jim" <jim@yourpc.edu wrote in message
                        >>>>>news:nkQji .29697$19.19186 @bignews5.bells outh.net...
                        >>>>>>>I thought that I read somewhere that services don't (or can't) have
                        >>>>>>>forms.
                        >>>>>>>
                        >>>>>>Is that true?
                        >>>>>>
                        >>>>>A service doesn't use forms, because the service is meant to run
                        >>>>>unattend ed once it's started/executed, with no user interfacing.
                        >>>>>>
                        >>>>>But a Windows desktop application using a form can communicate with
                        >>>>>with a service application, just like you see a personal firewall UI
                        >>>>>that communicates with its FW service application.
                        >>>>>
                        >>>>Do you know of any examples of this that I can learn from?
                        >>>>
                        >>>This is a C# example and everything that's being done in C# as far as
                        >>>using the namespace can be done in VB.NET as well.
                        >>>
                        >>Are you aware that you are in a VB.Net newsgroup?
                        >>
                        >Yes, I am aware I am in a VB NG. However, most examples of things are in
                        >C# .Net. You can search Google and see if you can find some examples in
                        >VB.
                        >>
                        >Once again, there is no difference between C# and VB.Net. The only
                        >difference between the two languages are syntactical. You should be able
                        >to take the C# example and come out with a VB example doing the same
                        >thing.
                        >>
                        >>
                        >>
                        >
                        Unless you need pointers or anonymous delegates :-)
                        Exactly! C# and VB.Net are NOT the same. I am just learning VB.Net.

                        I hate .Net, but the job calls for it. I used to code in VB because I just
                        hate the syntax of C++. I like more verbose, natural languages. So, the
                        odds of me learning C# so that I can work in VB.Net are exactly zero.

                        jim


                        Comment

                        • Mr. Arnold

                          #13
                          Re: Can services have forms?


                          "jim" <jim@yourpc.edu wrote in message
                          news:rb9ki.7559 $ca.2497@bignew s4.bellsouth.ne t...
                          >
                          "Blake" <no@emailwrot e in message
                          news:u3vytzUwHH A.312@TK2MSFTNG P04.phx.gbl...
                          >"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                          >news:u2IHXYUwH HA.1184@TK2MSFT NGP04.phx.gbl.. .
                          >>>
                          >>"jim" <jim@yourpc.edu wrote in message
                          >>news:xWZji.73 85$ca.7219@bign ews4.bellsouth. net...
                          >>>>
                          >>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                          >>>news:OcdcF9Q wHHA.3684@TK2MS FTNGP02.phx.gbl ...
                          >>>>>
                          >>>>"jim" <jim@yourpc.edu wrote in message
                          >>>>news:OiUji. 29791$19.9526@b ignews5.bellsou th.net...
                          >>>>>>
                          >>>>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                          >>>>>news:%23Nr ZL$MwHHA.312@TK 2MSFTNGP04.phx. gbl...
                          >>>>>>>
                          >>>>>>"jim" <jim@yourpc.edu wrote in message
                          >>>>>>news:nkQj i.29697$19.1918 6@bignews5.bell south.net...
                          >>>>>>>>I thought that I read somewhere that services don't (or can't) have
                          >>>>>>>>forms .
                          >>>>>>>>
                          >>>>>>>Is that true?
                          >>>>>>>
                          >>>>>>A service doesn't use forms, because the service is meant to run
                          >>>>>>unattende d once it's started/executed, with no user interfacing.
                          >>>>>>>
                          >>>>>>But a Windows desktop application using a form can communicate
                          >>>>>>with with a service application, just like you see a personal
                          >>>>>>firewal l UI that communicates with its FW service application.
                          >>>>>>
                          >>>>>Do you know of any examples of this that I can learn from?
                          >>>>>
                          >>>>This is a C# example and everything that's being done in C# as far as
                          >>>>using the namespace can be done in VB.NET as well.
                          >>>>
                          >>>Are you aware that you are in a VB.Net newsgroup?
                          >>>
                          >>Yes, I am aware I am in a VB NG. However, most examples of things are in
                          >>C# .Net. You can search Google and see if you can find some examples in
                          >>VB.
                          >>>
                          >>Once again, there is no difference between C# and VB.Net. The only
                          >>difference between the two languages are syntactical. You should be able
                          >>to take the C# example and come out with a VB example doing the same
                          >>thing.
                          >>>
                          >>>
                          >>>
                          >>
                          >Unless you need pointers or anonymous delegates :-)
                          >
                          Exactly! C# and VB.Net are NOT the same. I am just learning VB.Net.
                          I have been working with VB since 1996 and C# since 2004 and for the vast
                          majority of what the languages do in using the .NET Framework, which is what
                          we're talking about here. they do the same thing.

                          >
                          I hate .Net, but the job calls for it. I used to code in VB because I
                          just hate the syntax of C++. I like more verbose, natural languages.
                          What's a verbose and natural language? The only one that could fit that bill
                          would be Cobol. There is Cobol.NET too that you can use.

                          So, the odds of me learning C# so that I can work in VB.Net are exactly
                          zero.
                          No one is telling you to learn C#. But you should be sharp enough to use an
                          example in C#, as to what you can do in VB. But if you can't run with it,
                          you can't run with it. Find an example in VB if you can and move on.

                          Comment

                          • jim

                            #14
                            Re: Can services have forms?


                            "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                            news:ugHIbIZwHH A.3720@TK2MSFTN GP02.phx.gbl...
                            >
                            "jim" <jim@yourpc.edu wrote in message
                            news:rb9ki.7559 $ca.2497@bignew s4.bellsouth.ne t...
                            >>
                            >"Blake" <no@emailwrot e in message
                            >news:u3vytzUwH HA.312@TK2MSFTN GP04.phx.gbl...
                            >>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                            >>news:u2IHXYUw HHA.1184@TK2MSF TNGP04.phx.gbl. ..
                            >>>>
                            >>>"jim" <jim@yourpc.edu wrote in message
                            >>>news:xWZji.7 385$ca.7219@big news4.bellsouth .net...
                            >>>>>
                            >>>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                            >>>>news:OcdcF9 QwHHA.3684@TK2M SFTNGP02.phx.gb l...
                            >>>>>>
                            >>>>>"jim" <jim@yourpc.edu wrote in message
                            >>>>>news:OiUji .29791$19.9526@ bignews5.bellso uth.net...
                            >>>>>>>
                            >>>>>>"Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
                            >>>>>>news:%23N rZL$MwHHA.312@T K2MSFTNGP04.phx .gbl...
                            >>>>>>>>
                            >>>>>>>"jim" <jim@yourpc.edu wrote in message
                            >>>>>>>news:nkQ ji.29697$19.191 86@bignews5.bel lsouth.net...
                            >>>>>>>>>I thought that I read somewhere that services don't (or can't) have
                            >>>>>>>>>form s.
                            >>>>>>>>>
                            >>>>>>>>Is that true?
                            >>>>>>>>
                            >>>>>>>A service doesn't use forms, because the service is meant to run
                            >>>>>>>unattend ed once it's started/executed, with no user interfacing.
                            >>>>>>>>
                            >>>>>>>But a Windows desktop application using a form can communicate
                            >>>>>>>with with a service application, just like you see a personal
                            >>>>>>>firewa ll UI that communicates with its FW service application.
                            >>>>>>>
                            >>>>>>Do you know of any examples of this that I can learn from?
                            >>>>>>
                            >>>>>This is a C# example and everything that's being done in C# as far as
                            >>>>>using the namespace can be done in VB.NET as well.
                            >>>>>
                            >>>>Are you aware that you are in a VB.Net newsgroup?
                            >>>>
                            >>>Yes, I am aware I am in a VB NG. However, most examples of things are
                            >>>in C# .Net. You can search Google and see if you can find some examples
                            >>>in VB.
                            >>>>
                            >>>Once again, there is no difference between C# and VB.Net. The only
                            >>>difference between the two languages are syntactical. You should be
                            >>>able to take the C# example and come out with a VB example doing the
                            >>>same thing.
                            >>>>
                            >>>>
                            >>>>
                            >>>
                            >>Unless you need pointers or anonymous delegates :-)
                            >>
                            >Exactly! C# and VB.Net are NOT the same. I am just learning VB.Net.
                            >
                            I have been working with VB since 1996 and C# since 2004 and for the vast
                            majority of what the languages do in using the .NET Framework, which is
                            what we're talking about here. they do the same thing.
                            Then show use how to do pointers and anonymous delegates in VB.Net. (And,
                            for the love of God, don't post another "here's how to do it on C# - you can
                            convert it" BS answer.)
                            >
                            >
                            >>
                            >I hate .Net, but the job calls for it. I used to code in VB because I
                            >just hate the syntax of C++. I like more verbose, natural languages.
                            >
                            What's a verbose and natural language? The only one that could fit that
                            bill would be Cobol. There is Cobol.NET too that you can use.
                            Again.....you are in the VB.Net newsgroup, Waldo.
                            >
                            > So, the odds of me learning C# so that I can work in VB.Net are exactly
                            >zero.
                            >
                            No one is telling you to learn C#. But you should be sharp enough to use
                            an example in C#, as to what you can do in VB. But if you can't run with
                            it, you can't run with it. Find an example in VB if you can and move on.
                            You're the idiot that keeps posting C# examples to questions posted in a
                            VB.Net newsgroup!

                            I'm blocking you now......no need to respond.....

                            jim


                            Comment

                            • Spam Catcher

                              #15
                              Re: Can services have forms?

                              "jim" <jim@yourpc.edu wrote in
                              news:i%aki.7589 $ca.6423@bignew s4.bellsouth.ne t:
                              Then show use how to do pointers and anonymous delegates in VB.Net.
                              (And, for the love of God, don't post another "here's how to do it on
                              C# - you can convert it" BS answer.)
                              Yes, but 95% if the applications out there don't need pointers or anonymous
                              delegates.

                              For those apps that rely on pointers so heavily - wouldn't C++ be a better
                              choice?

                              Comment

                              Working...