Overview

Microsoft Small Basic is a free simplified programming language for children and adults to get started learning to program. See the Small Basic website for more details.

Preview Small Basic API

Also check out the Forum, Blog and Wiki articles.

Included below are links to download some demonstration extensions as well as a more complex extension. The extensions are written in C# and use the .Net 3.5 framework.

Extensions can be written in any .Net language, and provide a way for Small Basic programmers to develop their own skills and progress from Small Basic to larger programming languages, as well as generating useful features.

To write your own extension you will need Visual Studio which can be downloaded and installed for free.

To decompile and view the source for other extensions and SmallBasicLibrary.dll you can use IlSpy.

More information on writing your own extension can be found here and in downloads below.

If any download links appear broken, then please leave a post on Small Basic forum; larger downloads seem to be periodically deleted by web hoster.

Usage

To get the main LitDev extension, click the link at the top of this page.

Alternatively, click the appropriate icon next to an extension from those listed in the Extension Downloads sections below to download a zip file containing the required files.

Zip files can be un-zipped using various compression software, including JZip or 7Zip.

As with all Small Basic extensions, copy the extension dll and xml (inside the dll zip) to a lib sub-folder of the Small Basic installation folder, usually in one of the following locations:

C:\Program Files\Microsoft\Small Basic\lib
C:\Program Files (x86)\Microsoft\Small Basic\lib

You may require to create the lib folder if it doesn't exist.

Copy all other files (documentation and samples) elsewhere.

All extensions have to be rebuilt for each Small Basic version and only the current versions are maintained on this site.

Extensions

Click the DLL , Source (VS 2010), (VS 2012), (VS 2013), or Additional Resource icon next to the required download.

Please direct any questions, suggestions or problems to the Small Basic forum.

LitDev Extension Downloads

LitDev
Version 1.0.0.125


This extension contains all of the useful bits in the demonstration extensions and many additions as well as lots of other methods, ranging from simple utilities to physics simulation and 3D.

A pre-release test version is sometimes available from resource downloads below.
LitDev3D
UNMAINTAINED
AND MAY BE DEPRECIATED


 

A 3D extension using the irrlicht engine (64 bit only).

The associated media files (irrlicht samples) may be useful getting started.

Another actively maintained 3D method (LD3DView) is included in the LitDev extension and works on all PC architectures.
WaveForms This is a small extension to create PPM (Pulse Position Modulation) sound signals to control RC (remote control) devices.  It can be modified to create any sound wave form.

See blog post.  Requires installing SlimDX (.Net 2.0 version).

LitDev Extension Documentation

Preview LitDev Extension API or (Deutsch) - translation by Pappa Lapub

Preview LitDev Extension Change Log (View this version and previous version changes and new features)

Preview LDPhysics Getting Started Guide

Preview LitDev3D Extension API or (Deutsch)

LitDev Extension Details

The LitDev extension is actively developed and is updated periodically on this site only.

All of the objects in this combined extension start with LD to isolate them from other similarly named objects.

There are many samples ranging from simple demonstations to full programs included in the dll zip.

A detailed change log and current version check can be viewed by running LDUtilities.Version(), or see preview above.

The following is a brief summary of the LitDev extension objects, for the full API (functionality and syntax) see preview above.

LD3DView A 3D modelling set of methods for the GraphicsWindow.
LDArray A faster array method for large 1D arrays with 1000+ elements using integer indexing.
LDBlueTooth Bluetooth connections.
LDCall Call a subroutine as a function with arguments and optional return value.
LDChart Customisable chart control, including pie, doughnut, bubble, bar and column charts.
LDClient NEW The client methods for a client server multi-PC application.
LDControls Additional controls for the GraphicsWindow, including TreeView, RichTextBox, WebBrowser, ListBox, ComboBox, CheckBox, RadioButtons, MediaPlayer, Slider, ProgressBar, PasswordBox, DocumentViewer, Menu and ListView. Right-click context control menus for any shape or control. Drag and drop for some controls.
LDCursors Set cursors in the GraphicsWindow.
LDDataBase Create, access and query SQLite, MySQL, SqlServer, Oledb or Odbc databases.  See zetcode for SQLite primer.
LDDateTime Utilities to manipulate and calculate date and time differences, i.e. manipulate past and future dates.
LDDebug A debugging tool and auto instrumentation to create breakpoints.
LDDialogs Additional dialog utilities, including a blocking popup waiting dialog, tooltips, calendar, font, colours, GraphicsWindow right-click context menu and multi button message box.
LDDictionary Fix for broken Dictionary object in version 1.0 (also includes Spanish dictionary).
LDEncryption Encrypt and decrypt some text or create a password hash.
LDEmail Send email using an smtp server.
LDFastShapes Methods to modify shapes by integer index and batch update (faster).
LDFile File utilities like read and write CSV (comma separated value) files, read files to an array, file length, music file play time, print a file, get system folder paths, read non-UTF8 encodings like ANSI and save/read all variables.
LDGraph Graph plotting methods including export to Excel and CSV.
LDGraphicsWindow
(formerly in LDUtilities and LDShapes)
Export of GraphicsWindow to image files or print, and other utilities like pause and resume GraphicsWindow updates, GraphicsWindow icon, minimise/maximise the GraphicsWindow, transparent GraphicsWindow, over-ride GraphicsWindow close, disable window close buttons and Flood Fill regions.
LDHID A low level generic USB Human Interface Device (HID) interface.
LDImage UPDATED Extends ImageList to include image processing.
LDInline Include C# or VB methods, properties and events to compile and call from your Small Basic code.  It can also create dlls or extensions and use or probe other .Net dlls.
LDIOWarrior Access IOWarrior USB devices (see Code Mercenaries IO-Warrior).
LDList A data storage object similar to arrays where indices are automatically maintained.  It is much faster than Small Basic arrays and has other useful features.
LDMatrix Matrix algebra, for example to solve linear systems of equations.
LDMusic Extends Sounds.PlayMusic to include additional instruments and notes can also be played synchronously (chords).
LDNetwork † Web methods, including a method to store and retrieve game high scores and store game data.
LDPhysics A larger set of methods to simulate Dynamic Collision Physics using the Box2D engine. This is the same physics engine used for Angry Birds.
LDQueue UPDATED A data storage object similar to a stack, except that values are stored first-in first-out.
LDRegex
(formerly in LDUtilities)
Regex operations.
LDScrollBars UPDATED GraphicsWindow ScrollBars, careful use allows a scrolling type game.
LDSearch NEW Web base Bing searches.
LDServer NEW The server methods for a client server multi-PC application.
LDSettings Store and retrieve settings for your programs.
LDSort Array sorting by index and value, with number and string sorting supported.
LDSound Record and save sounds from a microphone. Play system sounds.
LDStatistics Statistics on a 1D array of numbers and random sample generation with normal, binomial, uniform and triangular distributions.
LDText UPDATED Text utilities, including, split, compare, trim, replace and find-all.
LDTextWindow TextWindow utilities, including low level key events, interruptable Read or ReadNumber, capture and print TextWindow.
LDTranslate Language translation.
LDUtilities List of available fonts or colours, culture number conversions and some assorted utilities.
LDWebCam A webcam object for the GraphicsWindow, with some simple effects.
LDWindows Create additional GraphicsWindows.
LDZip
(formerly in LDUtilities)
File Zip archiving.

LDColours
LDCommPort
LDEvents
LDFocus
LDProcess
LDShapes UPDATED
LDSpeech
LDMath (formerly LDTrig)
Maintained and in some cases significantly extended versions of the demonstration extensions are also included.

† The php files in the folders gamedata and highscore on this website are those used by the LDNetwork extension methods. You may use these with your own web site.  Since the php files are both called server.php you should keep the gamedata and highscore file structure.  To use the LitDev extension commands in LDNetwork with these php files (see download below) on your web site, you must first set the network location using the property LDUtilities.NetworkURL in your Small Basic code.  The default value is "http://litdev.co.uk" where the folders gamedata and highscore are located.
LitDev Extension Screenshots


Demonstration Extension Downloads

The following smaller extensions are provided with full source code for demonstration purposes for you to start building your own. They are no longer actively developed, but still show how various operations can be performed and interact with SmallBasicLibrary.dll.

All of the functionality in the demonstration extensions is contained in the LitDev extension, therefore there is no no need to download these unless you are interested in how they are made.

Download the source and unzip to a folder somewhere, open the solution (*.sln) in Visual Studio and build the solution. Copy the resulting dll and xml files to the Small Basic lib folder to then become available for Small Basic.

You may need to update the reference to where SmallBasicLibrary.dll is installed on your PC inside the References section of Solution Explorer in Visual Studio.

If you have any questions, then check out the 'Guide to writing extensions' below or ask on the Small Basic forum.

Colours   Get SmallBasic colours by name.
Music   Get a music file play time.
SerialPort   Access the serial port (code by Nino Carrillo. Original at http://code.msdn.microsoft.com/sbserial).
Spawn   Access system process information and start external processes.
Speech   Use a speech synthesizer to speak text.
TextBoxFocus   Set and get the focus for Controls and Textboxes.
Events   Sample creating event extension (display change).
ShapesExtension   A method to move a line shape and manipulate Shapes such as dashed pens, Z-index layering and some basic collision detection.
TrigD   Trig functions using degrees.

Other Resource Downloads

Samples
Some Small Basic samples that don't use extensions, but demonstrate a range of features.

Small Basic API
A printable and editable copy of the Small Basic API (commands and their syntax) created from SmallBasicLibrary.xml.

Previous versions
A previous msi installer may be required to correctly uninstall Small Basic before installing the current version.

Hello World test
A very simple compiled Small Basic program that can be used to test .Net if an installation of Small Basic fails.

Guide to writing extensions
Guides to setting up and compiling an extension using VS 2010 Express in C# and VB. This is very similar to using more recent versions of VS, where the guides are also applicable.

XML converter
Utility program to convert Small Basic and extension xml files to rtf and html documents. This tool was used to create the rtf files provided with extensions on this site as well as the Small Basic API above and html API previews. Tool also contains some other utilities. It requires .Net 4.5 which installer will detect and install if you want this tool.

Small Basic extension compiler
Compile an extension in Small Basic (simple example included). Code by Fremy Company, recompiled with permission for current version. See here and here for more details.

LDNetwork php files
Theses are the php files required to use LDNetwork methods on your own web area.

LitDev Beta
This is a pre-release 'beta' version of the LitDev extension updated as things are added for testing.

Wiki Articles

Programming Tips This article covers the basic ideas of structured programming, or some tips for writing better programs in Small Basic
Grammar Basics This article describes the main language elements or 'grammar' used by the Small Basic language and gives some suggestions for further study
Text Basics This article covers the basics of text manipulation in Small Basic using the Text object
Array Basics This article covers the basic use of the Small Basic Arrays
Stack Basics This article covers the basic use of the Small Basic Stack, with an example recursively finding all jpg image files in and below an initial directory
GraphicsWindow Basics This article covers the basic use of the Small Basic GraphicsWindow
Event Basics This article covers the basic use of events in Small Basic
Graduate to C# This article considers how to Graduate a Small Basic program to C#
Dynamic Graphics This article is an introduction to graphical game programming using Small Basic. It includes the basics of program design, movement, user interaction with keys and mouse, collision detection and introduces some more advanced ideas at the end.
Threading This article covers the basics of threading in Small Basic.
Sprite Arrays This article describes using arrays of sprites in a Small Basic program.
List Extension This article describes how Small Basic arrays are handled internally. It describes the advantages and disadvantages of the approach used, and introduces an alternative extension method 'LDList'.

Selected Blog Articles

Small Basic Featured Program - Solar System
Small Basic - Mouse Position Small Basic - Chart Extension
Small Basic - WebCam Motion Detection Small Basic Featured Program - Boxing Game
Small Basic - Flood Fill Small Basic Featured Program - Gravity Simulator
Small Basic - GetSettingsFilePath Small Basic - Traffic Light Challenge
Small Basic - Transparent GraphicsWindow Small Basic - Physics for Marionette Challenge
Small Basic - TextWindow Cursor Positioning Small Basic - Controls are Shapes
Small Basic - Clearing Turtle Trails Small Basic - Triangle Challenge
Small Basic - Random Numbers Small Basic - Colors
Sprite Arrays - Featured Article Small Basic - Hammer and Nails
Small Basic - About Monthly Challenges Small Basic - Box2D Physics Extension
Small Basic - Dudeson's Smoke Small Basic - Database Extension
Small Basic Featured Program - SideScroller Why Johnny Can't Code
Small Basic - Pulse Position Modulation Extension Small Basic Types