2015-08-13 169 views
-1

我需要隐藏外部应用程序的状态栏。VB.NET hwnd隐藏状态栏

有人可以解释我如何隐藏“msctls_statusbar32”。

预先感谢您!

回答

1

好,我找到一个办法做到这一点:

<DllImport("user32.dll", SetLastError:=True)> _ 
    Public Shared Function FindWindowEx(parentHandle As IntPtr, childAfter As IntPtr, className As String, windowTitle As IntPtr) As IntPtr 
End Function 

<DllImport("user32.dll", SetLastError:=True)> _ 
Public Shared Function GetWindow(parentHandle As IntPtr, childAfter As IntPtr) As IntPtr 
End Function 

<DllImport("user32.dll", SetLastError:=True)> _ 
Public Shared Function ShowWindow(parentHandle As IntPtr, childAfter As IntPtr) As IntPtr 
End Function 


    Dim statusBarHandle As IntPtr = FindWindowEx(_hwndX, IntPtr.Zero, "msctls_statusbar32", IntPtr.Zero) 
    Dim Ichildwind As IntPtr = GetWindow(statusBarHandle, 5) 
    ShowWindow(statusBarHandle, Nothing)