Fullscreen MaxGUI windows

BlitzMax Forums/MaxGUI Module/Fullscreen MaxGUI windows

grable(Posted 2006) [#1]
I dont know if anyone has posted about this before, but heres some simple code for getting MaxGUI in fullscreen mode on Windows. (needs MinGW to compile)

http://grable0.googlepages.com/ChangeDisplayMode.rar

a short example changes displaymode on ALT+ENTER
SuperStrict

Import "ChangeDisplayMode.bmx"

' fullscreen resolution
Const WIDTH:Int	= 320
Const HEIGHT:Int	= 240
Const BPP:Int		= 32
Const HZ:Int		= 75

Global frmMain:TGadget = CreateWindow( "Main", 128,128, WIDTH,HEIGHT, Null, WINDOW_FULLSCREEN | WINDOW_RESIZABLE)
Global text:TGadget = CreateLabel( "Press ALT + ENTER", 0,(HEIGHT/2)-10, WIDTH,20, frmMain, LABEL_CENTER)

SetHotKeyEvent( KEY_RETURN, MODIFIER_OPTION)
SetHotKeyEvent( KEY_ESCAPE, 0)

While WaitEvent()
	Select CurrentEvent.ID
		Case EVENT_HOTKEYHIT
			Select CurrentEvent.Data			
				Case KEY_RETURN
					If CurrentEvent.Mods = MODIFIER_OPTION Then
						ChangeWindowMode( frmMain, WIDTH,HEIGHT,BPP,HZ)
					EndIf
				Case KEY_ESCAPE
					Exit					
			EndSelect
		Case EVENT_WINDOWCLOSE 
			Exit
	EndSelect
Wend
End



Damien Sturdy(Posted 2006) [#2]
EXCELENT timing mate, just what I need. I really want to use maxGUI in our project but its lack of proper fullscreen and various other problems mean right now I can't.

This was one of a few features we need :) Thanks!


WendellM(Posted 2006) [#3]
Looks handy, thank you!


Nigel Brown(Posted 2006) [#4]
Tried the built example and apart from a window flahing on and off in the top corner of the monitor nothing happened?

When I try and build the example It looks and is unable to find "ChangeDisplayMode.bmx"?


grable(Posted 2006) [#5]
It could be the resolution it tries isnt supported on your card/monitor.

320x240x32 75hz is what the demo is set for.

If any of the functions returns False something went wrong ;)

btw, so long as all the files are in the same dir, the example test.bmx should compile... (if you have MinGW that is)


Filax(Posted 2006) [#6]
Excellent !!! great !


ImaginaryHuman(Posted 2006) [#7]
This probably will stay windows only a I'm fairly sure the Mac absolutely never allow anything to cover up the title bar menus. You can use the whole rest of the desktop but not the title bar area. Same goes for non-blitz apps.


freshmeat(Posted 2007) [#8]
This doesn't work for me.

I downloaded MinGW, What files do i need / how do i setup MinGW so I can compile this demo?


tonyg(Posted 2007) [#9]
About MingW


freshmeat(Posted 2007) [#10]
Woot thanks the above example worked! :D Thanks!

However the included text.bmx doesn't.

Comes up with a compiler error

"Identifier 'WaitEvent' not found


grable(Posted 2007) [#11]
Its because of a "recent" change to MaxGUI regarding the Event Queue, havent gotten around to update the archive yet ;)

Just stick this after the Framework command
Import BRL.EventQueue



freshmeat(Posted 2007) [#12]
Cool thanks alot guys :)


LAB[au](Posted 2007) [#13]
It's not working on my Xp computer, I see briefly the window moving to 0,0 coordinates then it switch back immediately to initial windowed 320,240.


grable(Posted 2007) [#14]
Maybe your graphics card/monitor doesnt support 320x240x75, try changing the resolution to 320x200x60 or 640x480x60.


LAB[au](Posted 2007) [#15]
Yep right, that was it. Thanks


Filax(Posted 2007) [#16]
Any chance to work with a menu bar ?


Filax(Posted 2010) [#17]
Can you confirm if the program run on vista or not ?

Edit : It work, you just need to replace hertz from 70 to 60 if you have a tft screen.