General Development

Quick question – crazyishone

crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
How does one make an application "invisible"? I am coding in C++. If nobody can tell me that, perhaps somebody knows the system commands that achieve the same thing. (This is a command-line app for windows).

Invisible = no window, not shown in taskbar.

------------------
quit posting on CCN? nope. I havn't been driven off yet.

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
what you want sounds like a daemon. I used to be able to make those in C but i have no idea how to now . Basically you have to run a program and fork a process using "fork()" and then end the first program. this will leave a section of looping code running on your computer. Just make sure to have a kill switch for it .

Anyways, if its nothing like what you want then i'm sorry, lol

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Ah, I think another word for what Jestermax is talking about is a TSR (or Terminate and Stay Resident). However, I don't think you need to go to that length if you're just doing normal Windows programming. Basically you just need your program to run without bringing up a console window, but it won't bring up a main form either. A lot of programs do this that just run in the little bar down by the clock in Windows.

Sorry, I don't know more -- but I did want to just comment on the TSR thing and say that while that was how one could do it back in the DOS days, I don't think it's needed anymore.

Cheers!

--clint

jestermax

Member

Posts: 1064
From: Ontario, Canada
Registered: 06-21-2006
haha probably not. i just really like daemons, lol. its a nifty idea. but ultimately senior han el clinto is right... a system tray program sounds more useful. too bad i have no idea how to do that
CoolJ

Member

Posts: 354
From: ny
Registered: 07-11-2004
It sounds like you want a windows service:

http://www.codeproject.com/dotnet/simplewindowsservice.asp

This example is using C#, but they can be written in any language..

service offer other cool abilities that appear to be very useful, for example:

quote:
...long-running functionality that does not interfere with other users who are working on the same computer...


oh, and if I remember right...you can start and stop them from a DOS prompt.

[This message has been edited by coolj (edited August 18, 2006).]

luke

Member

Posts: 311
From: I use your computer as my second Linux box
Registered: 10-30-2005
Hacker =D

I think there are command line options in VC++ (System::Console/System::Window or something like that)
You should be able to get rid of the windows by editing out those.

------------------
If you can see Chuck Norris, He can see You.
If you Can't see Chuck Norris, you may be seconds away from death.

crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
Ok. And yes, I'll be wanting to hide the little icon down by the clock as well. Thank you all for pointing me in the right direction(s).

------------------
quit posting on CCN? nope. I havn't been driven off yet.

[This message has been edited by crazyishone (edited August 18, 2006).]

firemaker103

Member

Posts: 643
From:
Registered: 07-13-2005
I think there is something user32 thats called SW_HIDE. You'll probably need the window's handle though. Try googling on that. Edit: Found something.

On a side note, I can help you do this in Blitz


------------------
"Be nice to the nerds because later on, you'll be working for them" - Bill Gates

[This message has been edited by firemaker103 (edited August 19, 2006).]

crazyishone

Member

Posts: 1685
From:
Registered: 08-25-2004
Ah thank you firemaker, looks like exactly what I need.

------------------
quit posting on CCN? nope. I havn't been driven off yet.