Results 1 to 3 of 3

Thread: Hide

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Rome,Italy
    Posts
    14

    Question

    How can hide everything application window
    by a VB Project???
    EX. (Hide Internet Explorer from my form).
    Thax!!!

  2. #2
    Guest
    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

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width