It shouldn't be this hard ;-)
Maybe it isn't.
Obviously the 'easy' answer would be the Viewport commands but if you have reason not to trust them you won't be using the 'easiest' method.
Anyway, I am, not suggesting doing a full-screen grab but, instead, have a screen-size image with a transparent centre.
Draw this image after all other drawing.
Alternatively, if the size of the border is to change then drawrect the border.
Graphics 800,600 While Not KeyHit(KEY_ESCAPE) Cls SetColor 255,255,255 SetRotation 0 DrawOval 100,100,30,100 SetRotation 45 DrawOval 150,300,30,100 SetRotation 0 drawborder Flip Wend Function drawborder() SetColor 255,0,0 DrawRect 0,0,600,100 DrawRect 0,0,100,600 DrawRect 500,0,100,600 DrawRect 0,500,600,100 End Function