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.


Text

The Text object provides helpful operations for working with Text.

Methods

Append

Text.Append(text1, text2)

Appends two text inputs and returns the result as another text. This operation is particularly useful when dealing with unknown text in variables which could accidentally be treated as numbers and get added, instead of getting appended.

text1

First part of the text to be appended.

text2

Second part of the text to be appended.

Returns

The appended text containing both the specified parts.

ConvertToLowerCase

Text.ConvertToLowerCase(text)

Converts the given text to lower case.

text

The text to convert to lower case.

Returns

The lower case version of the given text.

ConvertToUpperCase

Text.ConvertToUpperCase(text)

Converts the given text to upper case.

text

The text to convert to upper case.

Returns

The upper case version of the given text.

EndsWith

Text.EndsWith(text, subText)

Gets whether or not a given text ends with the specified subText.

text

The larger text to search within.

subText

The sub-text to search for.

Returns

True if the subtext was found at the end of the given text.

GetCharacter

Text.GetCharacter(characterCode)

Given the unicode character code, gets the corresponding character, which can then be used with regular text.

characterCode

The character code (Unicode based) for the required character.

Returns

A unicode character that corresponds to the code specified.

GetCharacterCode

Text.GetCharacterCode(character)

Given a unicode character, gets the corresponding character code.

character

The character whose code is requested.

Returns

A unicode based code that corresponds to the character specified.

GetIndexOf

Text.GetIndexOf(text, subText)

Finds the position where a sub-text appears in the specified text.

text

The text to search in.

subText

The text to search for.

Returns

The position at which the sub-text appears in the specified text. If the text doesn't appear, it returns -1.

GetLength

Text.GetLength(text)

Gets the length of the given text.

text

The text whose length is needed.

Returns

The length of the given text.

GetSubText

Text.GetSubText(text, start, length)

Gets a sub-text from the given text.

text

The text to derive the sub-text from.

start

Specifies where to start from.

length

Specifies the length of the sub text.

Returns

The requested sub-text

GetSubTextToEnd

Text.GetSubTextToEnd(text, start)

Gets a sub-text from the given text from a specified position to the end.

text

The text to derive the sub-text from.

start

Specifies where to start from.

Returns

The requested sub-text.

IsSubText

Text.IsSubText(text, subText)

Gets whether or not a given subText is a subset of the larger text.

text

The larger text within which the sub-text will be searched.

subText

The sub-text to search for.

Returns

True if the subtext was found within the given text.

StartsWith

Text.StartsWith(text, subText)

Gets whether or not a given text starts with the specified subText.

text

The larger text to search within.

subText

The sub-text to search for.

Returns

True if the subtext was found at the start of the given text.
(c) Copyright 2009, Microsoft Corporation. All rights reserved.