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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide my VB app to not shown in Taks Bar

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dears
Is there any way i can hide my app so it will not be shown in the "TASK BAR" the one which is shown in Windows NT when "CTL+ALT+DEL" is pressed..i dunno want the user to terminate my application from there..yes i can disable "CTL+ALT+DEL" key but i don't want to implement this also :)
all i want is that to hide the app so its not show in task bare
Regards
nOuman
 
use the property on the form called "ShowInTaskBar" and set it to false. that should do the trick.

Best Regards and many Thanks!
Michael G. Bronner X-)

"They who drink beer will think beer." Washington Irving
 

You mean the Task Manager, don't you, rather than the task bar?

The way to stop an application appearing in the Applications tab in the NT task manager is to hide the application's top-level, parent window.

Naturally, VB doesn't actually give you easy access to that window (it certainly isn't any of your forms). So here's a quick way of doing it. A couple of notes:

1) This example is for VB6 only
2) Example only works with the compiled version of your code, since in the development environment the IDE is the parent window. You can use GetWindow(Me.hwnd, GW_OWNER) to get the appropriate parent window in the IDE.

Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0

Private Sub HideApplication()
ShowWindow FindWindow("ThunderRT6Main", App.EXEName), SW_HIDE
End Sub
 
Wouldn't the application's top window be the MDIForm? In which case you could simply hide that. I'm just hypothesising here, I didn't actually try it out. Best Regards and many Thanks!
Michael G. Bronner X-)

"They who drink beer will think beer." Washington Irving
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top