By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,745 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,745 IT Pros & Developers. It's quick & easy.

background process

P: 14
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.
Apr 30 '07 #1
Share this Question
Share on Google+
15 Replies


100+
P: 149
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
Apr 30 '07 #2

P: 14
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..
May 1 '07 #3

Expert 5K+
P: 8,434
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?
May 1 '07 #4

P: 14
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--
May 2 '07 #5

isotope11
P: 10
Change the form's Visible property to False.
You will NOT see the form.
May 3 '07 #6

Expert 5K+
P: 8,434
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.
May 3 '07 #7

P: 14
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
?
May 7 '07 #8

Expert 5K+
P: 8,434
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.
May 7 '07 #9

P: 14
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...
May 17 '07 #10

Expert 5K+
P: 8,434
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?
May 18 '07 #11

P: 2
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
May 22 '07 #12

Expert 5K+
P: 8,434
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.
May 23 '07 #13

P: 2
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
May 23 '07 #14

P: 14
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..
Jun 1 '07 #15

Expert 5K+
P: 8,434
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..
I don't know that you'll find much help for this here. Most of us go to great lengths to keep such things out of our system. They are typically used for evil purposes, such as skimming credit card details.
Jul 11 '07 #16

Post your reply

Sign in to post your reply or Sign up for a free account.