background process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Devesh Sharma
    New Member
    • Jan 2007
    • 14

    background process

    Hello Friends,
    is there any way to make our program as background process so that it works forever..untill computer shutdown?

    please tell me if you the technique..i want to make the program that works for forever..no matter it is active or inactive.
  • ansumansahu
    New Member
    • Mar 2007
    • 149

    #2
    Originally posted by Devesh Sharma
    Hello Friends,
    is there any way to make our program as background process so that it works forever..untill computer shutdown?

    please tell me if you the technique..i want to make the program that works for forever..no matter it is active or inactive.
    If you are using VB.net you can run it as a windows service and it will continue to run in the background.

    -ansuman sahu

    Comment

    • Devesh Sharma
      New Member
      • Jan 2007
      • 14

      #3
      Originally posted by ansumansahu
      If you are using VB.net you can run it as a windows service and it will continue to run in the background.

      -ansuman sahu
      thanks mr. ansuman sahu,
      but i am nt using VB.NET , is there any way that i can make my Exe file as background process..

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by Devesh Sharma
        thanks mr. ansuman sahu,
        but i am nt using VB.NET , is there any way that i can make my Exe file as background process..
        That probably depends on what you mean by a "background process". If it's running, and doesn't show a form, does that qualify? In which case, just don't show a form.

        Can we assume that you're using VB6?

        Comment

        • Devesh Sharma
          New Member
          • Jan 2007
          • 14

          #5
          Originally posted by Killer42
          That probably depends on what you mean by a "background process". If it's running, and doesn't show a form, does that qualify? In which case, just don't show a form.

          Can we assume that you're using VB6?
          i want my program(exe) that stats and run forever, it shud nt depend upone whether it is active or inactive, like if i want to monitor my keyboard, all time which key is pressed , no matter which othre program is running ..i think u are understanding my problem--

          Comment

          • isotope11
            New Member
            • Mar 2007
            • 10

            #6
            Change the form's Visible property to False.
            You will NOT see the form.

            Comment

            • Killer42
              Recognized Expert Expert
              • Oct 2006
              • 8429

              #7
              Originally posted by Devesh Sharma
              i want my program(exe) that stats and run forever, it shud nt depend upone whether it is active or inactive, like if i want to monitor my keyboard, all time which key is pressed , no matter which othre program is running ..i think u are understanding my problem--
              Unless you specifically code it that way, a VB program will not stop just because it's no longer the active window.

              If you're planning to write a keylogger, then please don't ask for any more help here. Most of us spend time and/or money on software to keep those damned things out of our systems.

              Comment

              • Devesh Sharma
                New Member
                • Jan 2007
                • 14

                #8
                Originally posted by isotope11
                Change the form's Visible property to False.
                You will NOT see the form.
                if i will off the visivilty, that doest means that it will work forever, when it became inactive will it be in running mode
                ?

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  Originally posted by Devesh Sharma
                  if i will off the visivilty, that doest means that it will work forever, when it became inactive will it be in running mode
                  ?
                  If a VB program is running, it will keep on running. It doesn't care whether it is visible or not.

                  If you wanted it to behave differently when it is not "active" (I'm assuming that you mean when it loses the focus) you would have to explicitly tell it to.

                  Comment

                  • Devesh Sharma
                    New Member
                    • Jan 2007
                    • 14

                    #10
                    Originally posted by Killer42
                    If a VB program is running, it will keep on running. It doesn't care whether it is visible or not.

                    If you wanted it to behave differently when it is not "active" (I'm assuming that you mean when it loses the focus) you would have to explicitly tell it to.

                    please make it clear is there any way that inactive program work as it is active, like i type somthing and program is not active or minimised then my keyboard will work for other program...

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #11
                      I really don't understand what you're asking.

                      For starters, can you explain what you mean by a program being "inactive"? Do you just mean that it doesn't have the focus?

                      It's starting to sound as though you are trying to build a "keylogger" . That is, a program which can sit in the background and read what's happening on the keyboard (and/or mouse) while the user interacts with other programs. Does this sound about right?

                      Comment

                      • vivekjain17
                        New Member
                        • May 2007
                        • 2

                        #12
                        Hello All,

                        I have some similar problem. I want to create a VB6.0 application which is called from command line, application will call database and write it in text file on machine.

                        I created Standard exe and my method to check database and write to file work fine if I call that method from form_load method, but this loaded a form on top and I do not want the form to come. I want to close the application one it's done writing on file, it should not be open for life long.

                        How can I achieve this scenario with out loading form?

                        Any response is really appreciated

                        Thanks in anticipation.

                        Regards,
                        Vivek Jain

                        Comment

                        • Killer42
                          Recognized Expert Expert
                          • Oct 2006
                          • 8429

                          #13
                          Originally posted by vivekjain17
                          I have some similar problem. I want to create a VB6.0 application which is called from command line, application will call database and write it in text file on machine.

                          I created Standard exe and my method to check database and write to file work fine if I call that method from form_load method, but this loaded a form on top and I do not want the form to come. I want to close the application one it's done writing on file, it should not be open for life long.

                          How can I achieve this scenario with out loading form?
                          What you do is create a project with no forms in it. Under Project Properties, in the General tab, set the Startup Object to Sub Main.

                          Then, in a code module, create a Public Sub called Main. That's where your code goes. Once Main exits, your application should close automatically.

                          Comment

                          • vivekjain17
                            New Member
                            • May 2007
                            • 2

                            #14
                            Originally posted by Killer42
                            What you do is create a project with no forms in it. Under Project Properties, in the General tab, set the Startup Object to Sub Main.

                            Then, in a code module, create a Public Sub called Main. That's where your code goes. Once Main exits, your application should close automatically.
                            Thanks a lot Killer42,

                            I tried some thing similar last evening after I sent you the request and was able to achieve desired behavior. Thanks a ton for responding to my request.

                            Vivek Jain

                            Comment

                            • Devesh Sharma
                              New Member
                              • Jan 2007
                              • 14

                              #15
                              Originally posted by Killer42
                              I really don't understand what you're asking.

                              For starters, can you explain what you mean by a program being "inactive"? Do you just mean that it doesn't have the focus?

                              It's starting to sound as though you are trying to build a "keylogger" . That is, a program which can sit in the background and read what's happening on the keyboard (and/or mouse) while the user interacts with other programs. Does this sound about right?

                              after a long time, i read ur mail, ya you are right i want what is happening wid keyboard and mouse while user interacts wid other program. for this should i use assembly language..

                              Comment

                              Working...