HideWindow DLL
Blitz3D Forums/Blitz3D Userlibs/HideWindow DLL
| ||
Edit - Sorry if the DLL didn't work had a wrong setting when I compiled, should work now. Don't know if this one exists in the Blitz forums. Pretty much hides a currently running window. Also in the code archives at http://www.blitzbasic.com/codearcs/codearcs.php?code=2328 Description: Use to hide/show a window currently running. Use the HideWindow function once putting the "hidewindow.dll" and "hidewindow.decls" files in the Blitz3D\UserLibs folder. HideWindow takes one parameter f_procName$ which is the name of the TITLE of the window. Also use ShowWindow the same way. Download: http://rapidshare.com/files/150758760/HideWindowDLL.zip.html Example Code: ;Can change Title$ to whatever you want to hide. AppTitle "HideWindow Example" Title$ = "HideWindow Example" Result% = HideWindow(Title$) If Result% Print Title$ + " hidden!" Else Print "Failed to hide " + Title$ End If Delay 2000 Print Result% = ShowWindow(Title$) If Result% Print Title$ + " shown!" Else Print "Failed to show " + Title$ End If Print Print "Press any key to quit." Print WaitKey End Hope it helps! |
| ||
Not to undermine your efforts, but this can be more simply accomplished without a extra DLL. To do so, grab this decl file. And the code below shows how to use the ShowWindow function. Const SW_HIDE = 0 Const SW_SHOWNORMAL = 1 Const SW_SHOWMINIMIZED = 2 Const SW_SHOWMAXIMIZED = 3 Const SW_SHOWNOACTIVATE = 4 Const SW_SHOW = 5 Const SW_MINIMIZE = 6 Const SW_SHOWMINNOACTIVE = 7 Const SW_SHOWNA = 8 Const SW_RESTORE = 9 Graphics 800,600 Print "Hiding in two seconds..." Delay 2000 api_ShowWindow SystemProperty("AppHWND"),SW_HIDE Delay 2000 api_ShowWindow SystemProperty("AppHWND"),SW_SHOW Print "Minimizing in two seconds..." Delay 2000 api_ShowWindow SystemProperty("AppHWND"),SW_MINIMIZE Delay 1000 api_ShowWindow SystemProperty("AppHWND"),SW_SHOWNORMAL Print "Restored!" Delay 2000 End |
| ||
Yes I actually realized this after I posted:) still, it wasn't actually made for blitz, I am coding in C++ and decided to pack it in a DLL, no harm done. Thanks |