Hi Eikon,
Thanks so much for your help! You seem to have solved my problem with the window, it now fills the screen. However, I wonder if you could take one final look at my altered version of your original program. Have I done things in the most efficient way? In other words, when I removed the borders and the menu, did I leave behind any fragments of the old version of the program? Do I still need both the “parent window” and the “canvas” now that I have removed the border and the sunken frame thing?
The program now looks like this:
; Parent Window
Parent = CreateWindow("B+ Window Framework by Eikon", 0, 0, ClientWidth(Desktop()), ClientHeight(Desktop()), 0, 0)
; Sunken Panel (nicer canvas look)
Panel = CreatePanel(0, 0, 1600, 1200, Parent) ;NOTE I’M RUNNING IN 1600,1200
SetGadgetLayout Panel, 0, 0, 0, 0
; Canvas
Canvas = CreateCanvas(0, 0, 1600, 1200, Panel) ;NOTE I’M RUNNING IN 1600,1200
SetBuffer CanvasBuffer(Canvas)
Local OX, OY ; Old MX, MY
AutoSuspend 1
SeedRnd MilliSecs()
CreateTimer 60 ; 60 FPS
Repeat
Select WaitEvent()
Case $803: End ; X Out
Case $1001 ; Menu Event
If EventData() = cnt_EXIT Then End
Case $4001 ; Tick
MX = MouseX(Canvas): MY = MouseY(Canvas)
If MX <> OX Or MY <> OY Then ; Mouse moved
OX = MX: OY = MY
Color Rand(0, 255), Rand(0, 255), Rand(0, 255)
Rect MX, MY, Rand(5, 10), Rand(5, 10)
EndIf
VWait 1: FlipCanvas Canvas, 0
End Select
Forever
Thanks so much for your help! You seem to have solved my problem with the window, it now fills the screen. However, I wonder if you could take one final look at my altered version of your original program. Have I done things in the most efficient way? In other words, when I removed the borders and the menu, did I leave behind any fragments of the old version of the program? Do I still need both the “parent window” and the “canvas” now that I have removed the border and the sunken frame thing?
The program now looks like this:
; Parent Window
Parent = CreateWindow("B+ Window Framework by Eikon", 0, 0, ClientWidth(Desktop()), ClientHeight(Desktop()), 0, 0)
; Sunken Panel (nicer canvas look)
Panel = CreatePanel(0, 0, 1600, 1200, Parent) ;NOTE I’M RUNNING IN 1600,1200
SetGadgetLayout Panel, 0, 0, 0, 0
; Canvas
Canvas = CreateCanvas(0, 0, 1600, 1200, Panel) ;NOTE I’M RUNNING IN 1600,1200
SetBuffer CanvasBuffer(Canvas)
Local OX, OY ; Old MX, MY
AutoSuspend 1
SeedRnd MilliSecs()
CreateTimer 60 ; 60 FPS
Repeat
Select WaitEvent()
Case $803: End ; X Out
Case $1001 ; Menu Event
If EventData() = cnt_EXIT Then End
Case $4001 ; Tick
MX = MouseX(Canvas): MY = MouseY(Canvas)
If MX <> OX Or MY <> OY Then ; Mouse moved
OX = MX: OY = MY
Color Rand(0, 255), Rand(0, 255), Rand(0, 255)
Rect MX, MY, Rand(5, 10), Rand(5, 10)
EndIf
VWait 1: FlipCanvas Canvas, 0
End Select
Forever