Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto re-open

Status
Not open for further replies.

Vec

IS-IT--Management
Jan 29, 2002
418
US
How can I make my app auto re-open if closed or ended. This is needed because I made a child safe browser for my kids but they could still close it using ctrl-alt-del. Basically I want this app to run and not allow any other access to the machin until it is closed by an admin password.

-------------------------------------------------------------------------
-------------------------------------------------------------------------

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Univer
 
To stop someone closing your app using the normal close methods you can use..

Public Closer As Boolean

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

If Closer Then
'Unload your program
Else
Cancel = 1
End If
End Sub

If you on win98 or ME you can use App.TaskVisible = False
You can hide the name of your program using App.Title = vbNullString

But, to do it properly have a look at the following link, it allows you to hijack another process's memory and run your exe hidden. ie: You can inject your app into another process's memory, such as explorer (windows). Perfect for what you want!


Good luck!
 
That will prevent it from being visible in the task manager.
 
Sure it does, just place it in the sub Main or initial form load event. Then create the exe run it and you will not see the app listed in the task manager.
 
Ive never tried it on xp personally, but Ive read so many forums etc whereby people have stated it doesnt work on xp, Vec are you on xp?
And does it work for you? or anyone else that tries it. (sorry to doubt you DrJavaJoe) :p
 
I just tested it on XP .. it works fine.

Somtimes, the easy answer is the hardest to find. :)
 
I am on XP Pro and it keeps it out of the task manager, what about XP Home?

-------------------------------------------------------------------------
-------------------------------------------------------------------------

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Univer
 
<sigh>

Look, App.TaskVisible stops VB applications from appearing in the W95/W98/Me task list.

It also happens to stop the app from appearing in the Applications tab in NT/W2000/XP Home/XP Pro/W2003 in Task Manager, but does not stop the app from appearing in the Process list tab of the self-same utility. In other words, under the NT-based OSs TaskVisible is not a good way of hiding your application
 
Also, I just noticed I need to disable the windows key will this is running, otherwise you can just use the start menu to open IE

The other option is to not allow any program to run over top of this app while it is running.

-------------------------------------------------------------------------
-------------------------------------------------------------------------

&quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Univer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top