Code archives/Graphics/full screen

This code has been declared by its author to be Public Domain code.

Download source code

full screen by mindstorms2006
You need to put the commands at the top of the code into user32 in user libs to make this work. It uses windowed mode but takes up the whole screen, so it looks like full-screen. Good for LED monitors. It can work in both 3d and 2d.
;needed in libs
;---------------------------------------------------------------------------------
; User32.decls
;==============
;
;.lib "user32.dll"
;
;api_FindWindow%( class$,Text$ ):"FindWindow"
;api_GetWindowLong%(hwnd%, nIndex%) : "GetWindowLong"
;api_GetSystemMetrics%(nIndex%) : "GetSystemMetrics"
;api_MoveWindow%(hwnd%, x%, y%, nWidth%, nHeight%, bRepaint%) : "MoveWindow"
;api_SetWindowLong%(hwnd%, nIndex%, dwNewLong%) : "SetWindowLong"
;api_ShowWindow%(hwnd%, nCmdShow%) : "ShowWindow"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Const SM_CXSCREEN		= 0
Const SM_CYSCREEN		= 1
Const WS_VISIBLE		= $10000000
Const GWL_STYLE			= -16
Const title$ = "anything you want(must be set)(can't see it)"

Global width = api_GetSystemMetrics(SM_CXSCREEN) 
Global height = api_GetSystemMetrics(SM_CYSCREEN) 
Graphics width,height,0,2

AppTitle title$

blitz_hnd = api_FindWindow("Blitz Runtime Class", title$)



api_SetWindowLong(blitz_hnd, GWL_STYLE, WS_VISIBLE)


api_MoveWindow(blitz_hnd, (api_GetSystemMetrics(SM_CXSCREEN) - width) / 2, (api_GetSystemMetrics(SM_CYSCREEN) - height) / 2, width, height, 1)

Comments

Yan2006
Wow...Deja vu...


Code Archives Forum