-
Nov 21st, 2000, 05:47 AM
#1
Thread Starter
New Member
How can hide everything application window
by a VB Project???
EX. (Hide Internet Explorer from my form).
Thax!!!
-
Nov 21st, 2000, 04:05 PM
#2
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
-
Nov 21st, 2000, 04:07 PM
#3
This next example will loop through all windows and hide them.
Code for a Module.
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 for a Form.
Code:
Private Sub Form_Load()
EnumWindows AddressOf EnumWindowsProc, 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|