Startup a winform hidden

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

    #16
    Re: Startup a winform hidden

    Yes I noticed, but my message was sent allready.
    He was called Mrs Wagner, not sheep shagger.


    "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
    news:er7h54sNGH A.428@tk2msftng p13.phx.gbl...[color=blue][color=green]
    >> Ok, I get the point.
    >> Let me put it like this than, I don't think it is a place to call
    >> somebody sheep shagger, when he helps out other people with problems.
    >>[/color]
    > Nobody is calling somebody a sheep shagger, that is the Nick the one who
    > has sent the message is using.
    >
    > Cor
    >[/color]


    Comment

    • Cor Ligthert [MVP]

      #17
      Re: Startup a winform hidden

      Alison,

      Now I get what you want. In my idea will in this probably more a VBS
      solution help you than a VBNet solution.

      A short search in the newsgroup using Google gave me this



      By the way, you cannot start a windowform (using the standard form) hidden.
      It will always try to activate the form. Or you should try Herfried
      workaround for that given in this message thread.

      I hope this helps,

      Cor


      Comment

      • Alison Givens

        #18
        Re: Startup a winform hidden

        I am not sure what you mean by, it is more VBS.
        Can I use this code in VB.NET2003, when I use it to make a windows
        application?

        Alison



        "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
        news:%237$o1BtN GHA.2012@TK2MSF TNGP14.phx.gbl. ..[color=blue]
        > Alison,
        >
        > Now I get what you want. In my idea will in this probably more a VBS
        > solution help you than a VBNet solution.
        >
        > A short search in the newsgroup using Google gave me this
        >
        > http://groups.google.com/group/micro...0df0bbfad969cf
        >
        > By the way, you cannot start a windowform (using the standard form)
        > hidden. It will always try to activate the form. Or you should try
        > Herfried workaround for that given in this message thread.
        >
        > I hope this helps,
        >
        > Cor
        >[/color]


        Comment

        • Cor Ligthert [MVP]

          #19
          Re: Startup a winform hidden

          Alison,

          I mean that a window application for what you ask is not simple.

          As somebody has answered you as well in this message thread, probably do you
          need a windowservice. However in my opinion is for this every
          windowapplicati on an overkill for this.

          AFAIK is VBS is the normal tool for this.

          Did you look at the sample in the thread I have showed you?

          Cor


          Comment

          • Herfried K. Wagner [MVP]

            #20
            Re: Startup a winform hidden

            "Sheep Shagger" <sheep@shagger. net> schrieb:[color=blue]
            > do u know vb??[/color]

            Sure, I know VB.NET. Even VB.NET supports 'Sub Main' as entry point:

            \\\
            Public Module Program
            Public Sub Main()
            DoSomething()
            End Sub
            End Module
            ///

            .... then choose 'Sub Main' as startup object in the project properties.

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

            Comment

            • C-Services Holland b.v.

              #21
              Re: Startup a winform hidden

              Alison Givens wrote:[color=blue]
              > In the netwerk environment, there still are users that place some of their
              > files on the local disk.
              > What I want is that when the user shuts down his/her pc at the end of the
              > day, a file called copy.bat is started.
              > In this batch file the need files will be copied to the server.
              > The app I want to do this with, has to be invisible, so the user cannot
              > close it.
              > It also needs some kind of a timer function, so that the pc isn't shut down
              > before the files are copied.
              >[/color]

              So basically you're writing a program because people refuse the obey the
              company rules (only save to the network). So you're going to call
              copy.bat. What is that going to copy? The whole disk? You'll need to
              since you obviously don't have control over where people save their
              data. If you're only copying certain directories, you're bound to miss
              some files.

              The users need to be educated and learn that the only safe way to store
              their files is on the network. Educational manners (for sysops): clear
              the HD from time to time (first backup the files) and let them sweat it
              out a few hours before returning their files. In my experience users
              learn pretty quick to use the network that way >:)

              Maybe print out the text:

              "FILES ON LOCAL DRIVES AREN'T INCLUDED IN THE BACKUP"

              on a sheet of A0 paper and hang that in the office for a while. Or
              better yet, make it a windows wallpaper and enforce it using policies so
              they can't change the wallpaper.

              While these measures seem rediculous, my point is that you need to
              educate your users and not let them make you clean up their mess.



              --
              Rinze van Huizen
              C-Services Holland b.v

              Comment

              • Alison Givens

                #22
                Re: Startup a winform hidden

                We are fully aware of this.
                It is just that we have clients that use Terminal Server.
                We have certain programs that we don't like to use through Terminal Server.
                Therefore these programs run locally.





                "C-Services Holland b.v." <csh@REMOVEcsh4 u.nl> wrote in message
                news:1Mudnbg5WN 1whGbeRVnytQ@ze elandnet.nl...[color=blue]
                > Alison Givens wrote:[color=green]
                >> In the netwerk environment, there still are users that place some of
                >> their files on the local disk.
                >> What I want is that when the user shuts down his/her pc at the end of the
                >> day, a file called copy.bat is started.
                >> In this batch file the need files will be copied to the server.
                >> The app I want to do this with, has to be invisible, so the user cannot
                >> close it.
                >> It also needs some kind of a timer function, so that the pc isn't shut
                >> down before the files are copied.
                >>[/color]
                >
                > So basically you're writing a program because people refuse the obey the
                > company rules (only save to the network). So you're going to call
                > copy.bat. What is that going to copy? The whole disk? You'll need to since
                > you obviously don't have control over where people save their data. If
                > you're only copying certain directories, you're bound to miss some files.
                >
                > The users need to be educated and learn that the only safe way to store
                > their files is on the network. Educational manners (for sysops): clear the
                > HD from time to time (first backup the files) and let them sweat it out a
                > few hours before returning their files. In my experience users learn
                > pretty quick to use the network that way >:)
                >
                > Maybe print out the text:
                >
                > "FILES ON LOCAL DRIVES AREN'T INCLUDED IN THE BACKUP"
                >
                > on a sheet of A0 paper and hang that in the office for a while. Or better
                > yet, make it a windows wallpaper and enforce it using policies so they
                > can't change the wallpaper.
                >
                > While these measures seem rediculous, my point is that you need to educate
                > your users and not let them make you clean up their mess.
                >
                >
                >
                > --
                > Rinze van Huizen
                > C-Services Holland b.v[/color]


                Comment

                • Phill  W.

                  #23
                  Re: Startup a winform hidden


                  "Alison Givens" <info@cross-it.nl> wrote in message
                  news:uTgsCwsNGH A.3360@TK2MSFTN GP15.phx.gbl...
                  [color=blue]
                  > In the netwerk environment, there still are users that place some of their
                  > files on the local disk.[/color]

                  Aren't there always ... ;-)
                  [color=blue]
                  > What I want is that when the user shuts down his/her pc at the end of the
                  > day, a file called copy.bat is started.
                  > In this batch file the need files will be copied to the server.
                  > The app I want to do this with, has to be invisible, so the user cannot
                  > close it.
                  > It also needs some kind of a timer function, so that the pc isn't shut
                  > down before the files are copied.[/color]

                  And therein lies your biggest problem.
                  When windows tries to shut down, it asks each running process,
                  /including/ the one that you've just /started/ to do all this file copying,
                  to shut down "nicely". It the process fails to do so - and yours obviously
                  will, because it's busy - Windows pops up a dialog asking if the user wants
                  to wait for the process to finish or just kill it off and, if they choose to
                  kill it,
                  there's absolutely nothing you can do about it.

                  Have you considered kicking this process off at the /start/ of the day, when
                  they start up their PC? I'd suggest this is a far safer proposition
                  (although,
                  of course, it may not marry up with your server backup schedule).

                  Regards,
                  Phill W.


                  Comment

                  Working...