BB___HOME

=HOME= toc

Description
> This command places the drawing pen to the center of a graphics window or graphics box.

Graphics Window

 * 1) print #WindowHandle, "home"
 * 2) #WindowHandle "home"

Graphics Box

 * 1) print #WindowHandle.ControlExtension, "home"
 * 2) #WindowHandle.ControlExtension "home"

Hints
> Place useful hints about this keyword here

Example
code format="vbnet" nomainwin open "A Blue Circle at the Center" for graphics_nsb as #main print #main, "trapclose [quit]" print #main, "down" print #main, "backcolor blue"

'center the drawing pen print #main, "home"

'...and draw the circle print #main, "circlefilled 10" print #main, "flush" wait

[quit] close #main end code

Getting the Size of the Graphics Area
code format="vbnet" 'Determines the width and height of a graphics window (excluding borders) / graphicbox 'handle$ - handle of a graphics window or a graphicbox 'width - receives the width 'height - receives the height

sub GraphicsArea handle$, byref width, byref height print #handle$, "home; posxy w h"   width = w * 2 height = h * 2 end sub code

Getting the Center of the Graphics Area
code format="vbnet" sub GetGraphicsCenter Handle$, byref CenterX, byref CenterY 'Determines the center of a graphics area 'Handle$ - handle of a graphics window or box 'CenterX - receives the position of the center along the X axis 'CenterY - receives the position of the center along the Y axis

#Handle$ "home" #Handle$ "posxy CenterX CenterY" end sub code