PDA

Click to See Complete Forum and Search --> : Somebody can make this ?


fnajar
Nov 24th, 2000, 02:55 PM
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)

KENNNY
Nov 24th, 2000, 05:06 PM
set the form's ShowInTaskbar property to false and it doesnt appear in the taskbar..

aaudette
Dec 5th, 2000, 12:04 PM
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

Chris
Dec 7th, 2000, 04:00 AM
Is this what you mention?


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

vlamassa
Dec 7th, 2000, 12:01 PM
I think this could be ....


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