Not sure what you mean by system default?!?
You can position the app window using this code.
Just save the xy position set at the end of the program.
And read it from a file at start up.
You can position the app window using this code.
Just save the xy position set at the end of the program.
And read it from a file at start up.
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// ' // BlitzMax Window Framework by Eikon ' // modified by Grisu ' // BMX 1.14 ' //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// Strict ' // Framework & Modules //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// Framework BRL.GLMax2D Import BRL.Basic Import BRL.System ' // Win32 API //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// Extern "win32" Function GetActiveWindow%() Function GetDesktopWindow%() Function GetWindowRect%(hWnd%, lpRect:Byte Ptr) Function SetWindowText%(hWnd%, lpString$z) = "SetWindowTextA@8" Function SetWindowPos%(hWnd%, after%, x%, y%, w%, h%, flags%) End Extern Type lpRECT Field l%, t%, r%, b% End Type ' // Create Window %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// Const GFX_WIDTH = 320, GFX_HEIGHT = 200, BIT_DEPTH = 0, HERTZ = -1 Graphics GFX_WIDTH, GFX_HEIGHT, BIT_DEPTH, HERTZ Local hWnd% = GetActiveWindow() Local desk_hWnd% = GetDesktopWindow(), l:lpRect = New lpRECT GetWindowRect desk_hWnd, l:lpRECT ' Get Desktop Dimensions SetWindowText hWnd, "My Window" ' Set Window Text ' Center Window SetWindowPos hWnd, -2, (l.r / 2) - (GFX_WIDTH / 2), (l.b / 2) - (GFX_HEIGHT / 2), 0, 0, 1 l:lpRECT = Null ' Mark for garbage collection GCCollect() ' Do collection :) Repeat; Flip; Until KeyDown(KEY_ESCAPE) Or (AppTerminate()=True) ' also exit if windowbutton is used!!!