Thank you this helps somewhat. But I still end up with an original window that I don't use. Can't I just create my gui and every thing else in a single window? I do end up with two open windows, one black and one with my graphics and buttons. The code I used was:
Graphics 800,600,0,3
w=CreateWindow( "Title1",0,0,600,400)
cv=CreateCanvas( 5,5,590,390,w)
SetBuffer CanvasBuffer(cv)
Cls
While Not KeyHit(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;Interface;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetFont LoadFont("Arial",14)
Color 200,100,80
Rect 0,0,640,480,1
Color 150,200,225
Rect 0,0,640,20,1
;;;;;;;;;;;;;;;;;;; Buttons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
k1=0
kx=30
ky=80
Color 0,0,200
CreateButton( "First Button",100,100,100,20,cv,1)
Flip
Wend
End
Graphics 800,600,0,3
w=CreateWindow( "Title1",0,0,600,400)
cv=CreateCanvas( 5,5,590,390,w)
SetBuffer CanvasBuffer(cv)
Cls
While Not KeyHit(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;Interface;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SetFont LoadFont("Arial",14)
Color 200,100,80
Rect 0,0,640,480,1
Color 150,200,225
Rect 0,0,640,20,1
;;;;;;;;;;;;;;;;;;; Buttons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
k1=0
kx=30
ky=80
Color 0,0,200
CreateButton( "First Button",100,100,100,20,cv,1)
Flip
Wend
End