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.


Sound

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

Methods

Pause

Sound.Pause(filePath)

Pauses playback of an audio file. If the file was not already playing, this operation will not do anything.

filePath

The path for the audio file. This could either be a local file (eg: c:\music\track1.mp3) or a file on the network (eg: http://contoso.com/track01.wma).

Returns

Nothing

Play

Sound.Play(filePath)

Plays an audio file. This could be an mp3 or wav or wma file. Other file formats may or may not play depending on the audio codecs installed on the user's computer. If the file was already paused, this operation will resume from the position where the playback was paused.

filePath

The path for the audio file. This could either be a local file (eg: c:\music\track1.mp3) or a file on the network (eg: http://contoso.com/track01.wma).

Returns

Nothing

PlayAndWait

Sound.PlayAndWait(filePath)

Plays an audio file and waits until it is finished playing. This could be an mp3 or wav or wma file. Other file formats may or may not play depending on the audio codecs installed on the user's computer. If the file was already paused, this operation will resume from the position where the playback was paused.

filePath

The path for the audio file. This could either be a local file (eg: c:\music\track1.mp3) or a file on the network (eg: http://contoso.com/track01.wma).

Returns

Nothing

PlayBellRing

Sound.PlayBellRing()

Plays the Bell Ring Sound.

Returns

Nothing

PlayBellRingAndWait

Sound.PlayBellRingAndWait()

Plays the Bell Ring Sound and waits for it to finish.

Returns

Nothing

PlayChime

Sound.PlayChime()

Plays the Chime Sound.

Returns

Nothing

PlayChimeAndWait

Sound.PlayChimeAndWait()

Plays the Chime Sound and waits for it to finish.

Returns

Nothing

PlayChimes

Sound.PlayChimes()

Plays the Chimes Sound.

Returns

Nothing

PlayChimesAndWait

Sound.PlayChimesAndWait()

Plays the Chimes Sound and waits for it to finish.

Returns

Nothing

PlayClick

Sound.PlayClick()

Plays the Click Sound.

Returns

Nothing

PlayClickAndWait

Sound.PlayClickAndWait()

Plays the Click Sound and waits for it to finish.

Returns

Nothing

Stop

Sound.Stop(filePath)

Stops playback of an audio file. If the file was not already playing, this operation will not do anything.

filePath

The path for the audio file. This could either be a local file (eg: c:\music\track1.mp3) or a file on the network (eg: http://contoso.com/track01.wma).

Returns

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