Help Please

BlitzPlus Forums/BlitzPlus Programming/Help Please

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well, to get it to update, you need to grab the desktop image repeatedly in your code, instead of just loading once. So like:
While Not KeyDown(1)

SetBuffer DesktopBuffer()
Global imagebackground=CreateImage( 773,600 )
GrabImage imagebackground,GraphicsWidth()/2-386,GraphicsHeight()/2-300
windowx = (GraphicsWidth()/2-(773/2))
windowy = (GraphicsHeight()/2-(600/2)) 
window = CreateWindow ("Game",windowx,windowy,773,600,Desktop(),0)
canvas = CreateCanvas (0, 0, ClientWidth (window), ClientHeight (window), window)
SetGadgetLayout canvas, 1, 1, 1, 1
SetBuffer CanvasBuffer (canvas)
DrawBlock imagebackground,0,0
FlipCanvas (canvas)

Wend
The only thing is that this will cause moderate to major slowdown on most PCs. To combat this problem, try creating some code that only updates the background if the window is moved.