hi,
how can i hide a window that doesnt belong to my program/project?
thanks!
Printable View
hi,
how can i hide a window that doesnt belong to my program/project?
thanks!
get the windows caption, or its class name (if you have Spy++, open it and get the classname)
VB Code:
'in module: Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal _ lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Public Const HIDE_WINDOW = 0 'somwhere else 'if you have caption w_handle = FindWindow(vbNullString,"Caption") 'if you have the classname w_handle = FindWindow("ClassName",vbNullString) PostMessage w_handle,HIDE_WINDOW,CLng(0),CLng(0)
thats it, hope that helps
-nabeel
where can i download spy++ ??
it comes with Visual Studio. i dont know if you can download it. if you know the programs caption you can use that too.
the program i want to hide is borderless so i cant see the caption...
when i press ALT+CTRL+DEL i see the name of the program and when i use "findWindow" using the name of the program it says that there a window with that caption... but it doesnt hide it... :(
You can also use the freeware program "The Customiser", a very handy tool that can retrieve the class as well.
Email me and I'll send you the program, since it's to big to add to this post (264kb zipped)
Please send it over to me via e-mail. [email protected]
Thanks!