How can hide everything application window
by a VB Project???
EX. (Hide Internet Explorer from my form).
Thax!!!
Printable View
How can hide everything application window
by a VB Project???
EX. (Hide Internet Explorer from my form).
Thax!!!
Use ShowWindow
Code:Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
Dim hApp As Long
hApp = FindWindowEx(0, 0, "IEFrame", vbNullString)
ShowWindow hApp, 0 'change 0 to 1 to show it again
End Sub
This next example will loop through all windows and hide them.
Code for a Module.
Code for a Form.Code:Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
ShowWindow hwnd, 0
End Function
Code:Private Sub Form_Load()
EnumWindows AddressOf EnumWindowsProc, 0
End Sub