Capturing the Desktop

BlitzMax Forums/BlitzMax GUI Programming/Capturing the Desktop

I'm a complete beginner with MaxGUI.
I am trying to capture and display the desktop.
Three questions.

I tried using the GrabScreen function from the archives.
It works fine, but the Blitzmax DOS window is included.
Is there some way I can suppress that window?

Second, I see that MaxGUI has a Desktop function.
How do I use it to display the desktop?

Third, How do I create a main window without a title bar?

Thank you.

this page might help:

http://www.chaos-interactive.de/index.php?show=12&lang=eng

1.The Dos window shouldn't be visible when you choose build GUI Application from the IDE.
2.The Desktop function returns only a handle (TGadget) which represents the system desktop.
You can then use it to get for instance some info like width and height.
GadgetWidth(Desktop()) or GadgetHeight(Desktop())
3. Check out the code below i put an close button on top, as the window misses it without titlebar...

Local Window1:TGadget = CreateWindow:TGadget("Window1",246,87,300,230,Null,Null)
	Local Close:TGadget = CreateButton:TGadget("Close",100,96,75,23,Window1:TGadget,BUTTON_PUSH)

Repeat
	WaitEvent()
	Select EventID()
		Case EVENT_WINDOWCLOSE
			Select EventSource()
				Case Window1	Window1_WC( Window1:TGadget )
			End Select

		Case EVENT_GADGETACTION
			Select EventSource()
				Case Close	Close_GA( Close:TGadget )
			End Select

	End Select
Forever

Function Window1_WC( Window:TGadget )
	DebugLog "Window Window1 wants to be closed"
'	HideGadget( Window:TGadget )

	End
End Function

Function Close_GA( Button:TGadget )
	DebugLog "Button Close was pressed"
	End
End Function


Build GUI app. Oh yeh. Duh. Problem Solved. Thanks.