Hide Console Window while running a file - Vb.net
Hide Console Window
Snippet Code
Hide a console window when the application is running.
Private Declare Function GetConsoleWindow Lib "kernel32.dll" () As IntPtr
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Int32
Private Const SW_SHOWMINNOACTIVE As Int32 = 7
Private Const SW_SHOWNORMAL As Int32 = 1
Private Const SW_HIDE As Int32 = 0
'To use it:
ShowWindow(GetConsoleWindow(), SW_HIDE)
Tags