I like to make a Program in VB that can make a window ( or program )dissapeared from the window's task bar, but the program keep loaded.
(Sorry my english)
Printable View
I like to make a Program in VB that can make a window ( or program )dissapeared from the window's task bar, but the program keep loaded.
(Sorry my english)
set the form's ShowInTaskbar property to false and it doesnt appear in the taskbar..
I you are shelling the program, yoo could declare a variable as an object, set it equal to shell(progid...)
then set the objects visible property to false
Is this what you mention?
Code:Public Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_SHOWNORMAL = 1
Public Const SW_HIDE = 0
Public hWnd As Long
Public Sub HideWnd(ByVal strWnd As String)
hWnd = FindWindow(0&, strWnd)
If hWnd <> 0 Then ShowWindow hWnd, SW_HIDE
End Sub
Public Sub ShowWnd(ByVal strhWnd As String)
hWnd = FindWindow(0&, strhWnd)
If hWnd <> 0 Then
ShowWindow hWnd, SW_SHOWNORMAL
End If
End Sub
'Useage
Private Sub Command1_Click()
HideWnd "<Your Application Window Title>"
End Sub
Private Sub Command2_Click()
ShowWnd "<Your Application Window Title>"
End Sub
I think this could be ....
Code:Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Private Sub Form_Initialize()
Dim lI As Long
Dim lJ As Long
lI = GetCurrentProcessId()
' 1 To see it visible y 0 not visible
lJ = RegisterServiceProcess(lI, 1)
End Sub