Small Basic API Reference
Arguments

The Arguments object provides operations to access the command-line arguments that were passed at the start of this program.

Array

This object provides a way of storing more than one value for a given name. These values can be accessed by another index.

Clock

This class provides access to the system clock

Desktop

This class provides methods to interact with the desktop.

Dictionary

This class provides access to an online Dictionary service.

File

The File object provides methods to access, read and write information from and to a file on disk. Using this object, it is possible to save and open settings across multiple sessions of your program.

Flickr

This class provides access to Flickr photo services.

GraphicsWindow

The GraphicsWindow provides graphics related input and output functionality. For example, using this class, it is possible to draw and fill circles and rectangles.

ImageList

This class helps to load and store images in memory.

Math

The Math class provides lots of useful mathematics related methods

Mouse

The mouse class provides accessors to get or set the mouse related properties, like the cursor position, pointer, etc.

Network

This private helper class provides network access methods

Program

The Program class provides helpers to control the program execution.

Shapes

The Shape object allows you to add, move and rotate shapes to the Graphics window.

Sound

The Sound object provides operations that allow the playback of sounds. Some sample sounds are provided along with the library.

Stack

This object provides a way of storing values just like stacking up a plate. You can push a value to the top of the stack and pop it off. You can only pop the values one by one off the stack and the last pushed value will be the first one to pop out.

Text

The Text object provides helpful operations for working with Text.

TextWindow

The TextWindow provides text-related input and output functionalities. For example using this class, it is possible to write or read some text or number to and from the text-based text window.

Timer

The Timer object provides an easy way for doing something repeatedly with a constant interval between.

Turtle

The Turtle provides Logo-like functionality to draw shapes by manipulating the properties of a pen and drawing primitives.


Shapes

The Shape object allows you to add, move and rotate shapes to the Graphics window.

Methods

AddEllipse

Shapes.AddEllipse(width, height)

Adds an ellipse shape with the specified width and height.

width

The width of the ellipse shape.

height

The height of the ellipse shape.

Returns

The Ellipse shape that was just added to the Graphics Window.

AddImage

Shapes.AddImage(imageName)

Adds an image as a shape that can be moved, animated or rotated.

imageName

The name of the image to draw.

Returns

The image that was just added to the Graphics Window.

AddLine

Shapes.AddLine(x1, y1, x2, y2)

Adds a line between the specified points.

x1

The x co-ordinate of the first point.

y1

The y co-ordinate of the first point.

x2

The x co-ordinate of the second point.

y2

The y co-ordinate of the second point.

Returns

The line that was just added to the Graphics Window.

AddRectangle

Shapes.AddRectangle(width, height)

Adds a rectangle shape with the specified width and height.

width

The width of the rectangle shape.

height

The height of the rectangle shape.

Returns

The Rectangle shape that was just added to the Graphics Window.

AddTriangle

Shapes.AddTriangle(x1, y1, x2, y2, x3, y3)

Adds a triangle shape represented by the specified points.

x1

The x co-ordinate of the first point.

y1

The y co-ordinate of the first point.

x2

The x co-ordinate of the second point.

y2

The y co-ordinate of the second point.

x3

The x co-ordinate of the third point.

y3

The y co-ordinate of the third point.

Returns

The Triangle shape that was just added to the Graphics Window.

Animate

Shapes.Animate(shapeName, x, y, duration)

Animates a shape with the specified name to a new position.

shapeName

The name of the shape to move.

x

The x co-ordinate of the new position.

y

The y co-ordinate of the new position.

duration

The time for the animation, in milliseconds.

Returns

Nothing

GetLeft

Shapes.GetLeft(shapeName)

Gets the left co-ordinate of the specified shape.

shapeName

The name of the shape.

Returns

The left co-ordinate of the shape.

GetTop

Shapes.GetTop(shapeName)

Gets the top co-ordinate of the specified shape.

shapeName

The name of the shape.

Returns

The top co-ordinate of the shape.

Move

Shapes.Move(shapeName, x, y)

Moves the shape with the specified name to a new position.

shapeName

The name of the shape to move.

x

The x co-ordinate of the new position.

y

The y co-ordinate of the new position.

Returns

Nothing

Remove

Shapes.Remove(shapeName)

Removes a shape from the Graphics Window.

shapeName

The name of the shape that needs to be removed.

Returns

Nothing

Rotate

Shapes.Rotate(shapeName, angle)

Rotates the shape with the specified name to the specified angle.

shapeName

The name of the shape to rotate.

angle

The angle to rotate the shape.

Returns

Nothing
(c) Copyright 2009, Microsoft Corporation. All rights reserved.