Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
<DllImport("kernel32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Function GetConsoleWindow() As IntPtr
End Function
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As ShowWindowCommands) As Boolean
End Function
Sample Code:
Enum ShowWindowCommands As Integer
Hide = 0
Normal = 1
ShowMinimized = 2
ShowMaximized = 3
ShowNoActivate = 4
Show = 5
Minimize = 6
ShowMinNoActive = 7
ShowNA = 8
Restore = 9
ShowDefault = 10
ForceMinimize = 11
End Enum
Dim hwnd As New IntPtr(0)
hwnd = GetConsoleWindow()
If (hwnd <> IntPtr.Zero) Then
ShowWindow(hwnd, ShowWindowCommands.ShowMinimized)
End If
Alternative Managed API:
Do you know one? Please contribute it!
The GetConsoleWindow API
6/22/2015 6:33:46 AM - -66.212.201.31
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).