ReadGraphicsWindowSize - nonkit/SmallWikiPad GitHub Wiki

Small Basic Coding Pattern > Compatible Pattern > SBO Pattern > ReadGraphicsWindowSize

ReadGraphicsWindowSize

Use following code

gw = GraphicsWindow.Width
gh = GraphicsWindow.Height

instead of

gw = 598
gh = 428
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh

for Small Basic Online v1.0 public preview (SBO 1.0). Because GraphicsWindow.Width and GraphicsWindow.Height in SBO 1.0 are read only. This pattern is trade-off with AvoidResize pattern.

See Also