First you need a file named "user32.delcs" in your userlibs folder. THe userlibs folder is located in the blitz3d installation folder. The file "user32.decls" should be edited with notepad and contain at least:
.lib "user32.dll"
ShowWindow(hwnd%,nCmdShow%)
Now you can use the user32.dll's function "ShowWindow" from within Blitz. This function is used to show, hide, minimize etc. a window.
also have a look at the win32 constants in the code archives, section userlibs.
Note: when your app is running in fullscreen mode, minimizing will pause it and the user will have to manually click it to reactivate it! (The only way around this is to use an external program that will reactivate it and also give it back the focus (I used "mouse_event" to simulate a mouseclick, forcing focus nomatterwhat, but that's an other, pretty hackish chapter).)
.lib "user32.dll"
ShowWindow(hwnd%,nCmdShow%)
Now you can use the user32.dll's function "ShowWindow" from within Blitz. This function is used to show, hide, minimize etc. a window.
graphics 640,480,32,2 const SW_SHOWMINIMIZED=6 const SW_SHOWNORMAL=1 hwnd=SystemProperty$("AppHWND") ShowWindow(hwnd, SW_SWOWMINIMIZED) delay 2000 ShowWindow(hwnd, SW_SHOWNORMAL) waitkey()
also have a look at the win32 constants in the code archives, section userlibs.
Note: when your app is running in fullscreen mode, minimizing will pause it and the user will have to manually click it to reactivate it! (The only way around this is to use an external program that will reactivate it and also give it back the focus (I used "mouse_event" to simulate a mouseclick, forcing focus nomatterwhat, but that's an other, pretty hackish chapter).)