Solved

Invisible application.

Posted on 2002-04-18
11
222 Views
Last Modified: 2010-05-02
I have to create a progam that will run invisible in the background, so no info on the taskbar or in the system-tray, and if possible even not in the taskmanager.

The program must be triggered if the user switch from one application to an other one, and must be ended if windows is closed.

How to do this ????
0
Comment
Question by:theo kouwenhoven
  • 2
  • 2
  • 2
  • +4
11 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6952199
app.TaskVisible = False
0
 
LVL 4

Expert Comment

by:nutwiss
ID: 6952252
yup...
and you could try setting the 'Requires User Interaction' to false (in the project properties) to save resources.

Have you thought of running the app as a service?

see: http://www.pyeung.com/userdefinedservice.html - the files mentioned cannot be downloaded from microsoft (they're part of the NT/2k Resource kit) even though the page mentioned is pretty much word for word a copy of an MSDN article.

Just a thought :)
0
 
LVL 4

Expert Comment

by:nutwiss
ID: 6952253
by the way - I assume you know you cannot use forms, just modules and classes if you use  'Requires User Interaction' = false
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 

Accepted Solution

by:
agamemnon earned 200 total points
ID: 6952466
Use these three declares inside a Module:
' // Used to Hide the Application from de task Bar
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

'// User to Hide the Application from de task Manager
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal hProcess As Long, ByVal lType As Long) As Long
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long


And this Comand Line in the initialization of a form(justa a example)

showwindow me.hwnd,0 ' // Hides from de taskbar, zero its the Hidden mode(SW_HIDE)

RegisterServiceProcess GetCurrentProcessId(), 1 ' // Hides from the task Manager 1 its the hide property


This will make your application invisible in the taskbar, and you can make an entire
application invisible, without restrictions. As far as i Know, the default for an application it´s not apear in the system tray, so this sould be enought for you hide your application.

I hope this´ll help you...

Boreki...
0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 6954355
Nice answer agamemnon,

Just answer the last part of the question and you get th points.

"The program must be triggered if the user switch from one application to an other one, and must be ended
if windows is closed."


0
 

Expert Comment

by:agamemnon
ID: 6954487
I did´nt understant this stuff of triggers if user switch what kind of o trigger do you want, your application will be listening to window chagens, and will notify when the user selects a diferent window?

And when you say "it must be ended if windows is closed", when you close windows, does´nt it closes all the open applications?
0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 6954618
Oke Oke,

A trigger on starting a new application will be usefull
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 6954978
ping
0
 
LVL 1

Expert Comment

by:alfanhendro
ID: 6958809
Not sure what you want, but try this.
Make another program (call it Detector),
sort of a Task Manager, to detect what are the applications running,active, etc.

Run this program A on Windows startup
(either registry run or program startup group
will be allright).

So you can detect when user switch applications(Apps).
Put your original program here(call it Main).

When user close the application(Apps),
same thing applied,detect from your Detector,
trigger the Main to close.

You may also combine the two program together, with the same concept.

Just theory :-). I don't know how to code this.

Regards
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7660484
Hi murphey2,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept agamemnon's comment(s) as an answer.

murphey2, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7660504
Hi murphey2,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept agamemnon's comment(s) as an answer.
    ** I think the answer to part 3 is "I can't be done"

murphey2, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question