Close & Minimize Buttons
Blitz3D Forums/Blitz3D Programming/Close & Minimize Buttons
| ||
Is there a method to eliminate or disable the Close and Minimize buttons on the small window that appears briefly when a Blitz 3D program is executed in full-screen mode? |
| ||
Dunno about - eliminating/disabling the buttons, but if you hid the little window, would that help? |
| ||
You can use some windows functions to achieve this. SetWindowLong + ShowWindow You can find an example of using them here: http://www.blitzbasic.com/codearcs/codearcs.php?code=829 |
| ||
I think someone completely fixed this over at blitzcoder.com. I don't know who, but maybe search the forums and you'll find the thread. |
| ||
You will get a short flicker, but this does it:DesktopW = User32_GetSystemMetrics(0) DesktopH = User32_GetSystemMetrics(1) WinW = GraphicsWidth() WinH = GraphicsHeight() ; Get hWnd pointer For the Blitz Window hWindow = User32_GetActiveWindow() ; Set the Blitz Window Style User32_SetWindowLong(hWindow,-16,$10000000 + $80000) ; Resize and center Blitz Window User32_MoveWindow(hWindow,(DesktopW-WinW)/2,(DesktopH-WinH)/2,WinW,WinH,True) WaitKey() EndGet the decls in the code archives two posts up. |
| ||
Thanks for the feedback! I used Fredborg's code, then added code to display a splash screen image. The end result is a small splash screen displayed without a border (at least this is the case with my particular configuration). DesktopW = GetSystemMetrics( 0 ) DesktopH = GetSystemMetrics( 1 ) WinW = GraphicsWidth() WinH = GraphicsHeight() hWindow = GetActiveWindow() SetWindowLong( hWindow, -16, $10000000 + $80000 ) MoveWindow(hWindow, ( DesktopW-WinW ) / 2, ( DesktopH - WinH ) / 2, WinW, WinH, True ) SetBuffer FrontBuffer() splash = LoadImage( MEDIA_PATH$ + "splash.png" ) DrawBlock splash, 0, 0 FreeImage splash Delay 250 |