Microsoft always makes the programming environment better and easy. Now, there is a new addition for programming learners that is called Small Basic. Small Basic is for any beginners who wants to learn programming. The new Small Basic IDE is similar to MS Paint, which makes programmers to work and enjoy learning. we still remember during our school days when we are in high school. During our computer class, the teacher used to ask to start with MS Paint. By using MS paint, we started learning how to use mouse, etc. Now, we can say instead of teaching MS Paint to any new user we can ask them to Start with Small Basic, Yes, Small Basic will be easy for any new person who is working on computer for the first time or who don’t know any programming language and want to start learning programming.

Any person who want to start learning programs, the good time is to start with Small Basic instead of starting from C, C#, VB.NET or C++. For many people who start learning any language like C, C++ , C# and etc, found it hard to understand all the basics. Without understanding the basics it will be hard for them to write a good program. Now no need to worry for that, since Small Basic is here for all of them.

We can strongly say that if anyone want to start learning programming for the first time they should start with Small Basic. They will surely easily understand what is IDE and Editor and how to run a program, how to write their own logic of program within couple of days. Later, they can easily learn any language as they wish for example like C++, C#, etc.

Why we recommend Small Basic for Beginners who want to learn Programming?

  • Simple and Easy
  • Small Basic IDE is similar to MS Paint which makes beginners to learn with fun.
  • Even Middle School Students can understand easily.

How to install Small Basic:

You can download the Small Basic from this Small Basic Download Link

Here is a TechNet Wiki Article which has all links to start learning Small Basic Small Basic Tutorial Links

There is a series of deep articles for people that want to read more, while this article is like "all in one" first glance for beginners: Small Basic Getting Started Guide.

Installation Steps

After downloading the Small basic from the above link install it on your computer.

Click Next and Install Microsoft Small Basic.

Finally, click Install Button which will install the Small Basic on your computer.

After installation you can find the Small Basic Icon on your computer.

Click and open Microsoft Small Basic.

When we open Small Basic for first time we can see the Development Environment with three parts:

  1.  Tool Bar - Simple and easy to understandable by any user as this has only New, Open, Save, Save As, Cut, Copy, Paste, and Run

  2. Editor - Here we write our Programs (This looks similar like Notepad)
  3. Help Window - Which will display our programming commands. 

Our First Small Basic Program (For Output)

Let’s create a simple program to display our Name as output. It will be always fun to see our name to be displayed from our first program. We still remember our high school days as we are always so happy to see our name to be displayed from C Language using printf().

Now let’s start on how to write our first program to display our Name from Small Basic.

The Output is to display any text or value from our program. As we all know that, Program is nothing but a set of instruction. Using one of the Instruction we can display our output. 

To display the Output from Small Basic we will be using:

TextWindow.WriteLine(“your output text”);

As we have told Small Basic Development Environment is much easier for any new developers who learn programs for first time. When you type text in editor, we can see a small window which will display all the text start from text (this are all the Instruction to perform our programming result).

Here we using TextWindow.WriteLine();  to display out first output. To display the output we using the WriteLine() and to read the Input from the user we will used the Read().Here WriteLine() and Read() are called as a function ,which means this two Read() and WritelLine() will have some set of Instruction which will execute our text and display or get the text from users.

Now let’s display our Name:

TextWindow.WriteLine("My Name is SHANU.Welcome to My first Program")

You can copy this code and paste in your Small Basic Editor. Note “SHANU” is my name so you have to change it to your name.

Yes now we have written our first program to display our name so what is next. Now we need to run the program and view our Output.

To run the program we can press F5 from key board or we can click the Run from the Tool Window.


So here is our first program output. We can feel how much you are happy while seeing your successful message. To close the output window you can press any key. Here all the output is based on Console so in next tutorial we will see about graphical window output.

Save the Program

You have successfully created your first program. Now you need to save the program so that you can use later and also you can modify the same program with more functionality. To save the program from Toolbar you can see the Save Icon click that and save the program to your selected folder for easy access.


The program will be saved as “.sb” extension.

If we run our program we can see in the same folder with few more files like “.dll” and “.exe” extension files. We can also run directly by clicking the “.exe” file. Here “.exe” is a Executable file.

Open the Saved Program

To open the existing saved file we can click Open icon from the toolbar in Small Basic. Go to the path where you have saved your program. Select the “.sb” extension file and click Open.

Our First Small Basic Program (For Input/output using Variable)

So you have successfully created your simple program to display your name as output now let’s see how to give input to your program and display the output of your input.

So what is the use of getting Input? Now, for example, you want to write a program where others can give their name as input and you need to display the user entered Name with welcome message. To perform this we need to store the name entered by user temporarily to the computer. Here we use variable to store the input. The variables will be reside in computer memory temporarily till we close our program.

In this example, program lets see how to store our name in a variable and display the output from our program.

TextWindow.WriteLine("My Name is SHANU.Welcome to My first Program")

TextWindow.WriteLine("What is your Name")


 TextWindow.WriteLine("welcome " + myname)


Copy the above code and paste into your editor.

  1. Here we can see first we display a name with welcome message.
  2. In the second line, we ask the user ”What is your Name.
  3. In the third line, we have used the variable “myname” for storing the user input to this variable.
  4. To get the user input here we use TextWindow.Read(). (For output we use WriteLine() and to get the input here we use Read()).
  5. Here we print the result with welcome message.

When we run the program first it will look like below. 

Here we can see first it display our name and then ask to give the input as “What is your Name”. Now user can give the input in the empty line. Here we have given the name “Afraz”.

After entering the name when user press any key the output with a user name and welcome message will be display as output.

Now we have successfully created our programs to read Input and print the output.

Simple Program to display background and font with colors

So far in above program the console windows was been displaying the output in black and white. Now let’s add colors for background of text and give some colors for the font.



TextWindow.WriteLine("wow now it looks cool with colors")

Copy the above code and paste into your editor.

For background color we use:


We can give any Small Basic supported color as we like.

For Font color we use:


We can give any Small Basic supported color as we like.

Now we give some text output and press F5 or click the Run button from the Toolbar. We can see the final output with cool color as output in our console window.

Program to add two numbers

Now let’s create a simple program to get two numbers as input from user and add both the numbers and display the calculated result to user. Here we use the colors to display the output as colorful.

In this program, we have also commented each line of code with its use.

Commenting is an important part of programming. A program is written once and used many times. If we write comments on code then it will be useful for any other programmer who is using our program, even for us in future it will be more useful as to why we have created this line in this program.

To add comment for each line in program we use single quotes' then the text inside the cotes will be in green color to differentiate as this is a comment.

This program needs an explanation as we have commented in each line with its uses. Have used all our above three programs to make one program as this has output, input and colors.

TextWindow.BackgroundColor="yellow" ' Background Color as Yellow

TextWindow.ForegroundColor="darkgreen" 'Font Color as Yellow

TextWindow.WriteLine("Welcome to simple Addition program") 'Welcome Msg

TextWindow.WriteLine("Enter your First Number") 'Ask user to enter first number

TextWindow.BackgroundColor="cyan" 'Back color for first input

TextWindow.ForegroundColor="blue" 'Font color for first input

number1=TextWindow.Read() ' read the user input and store in number1 variable

TextWindow.BackgroundColor="yellow" 'Back color

TextWindow.ForegroundColor="darkgreen" 'Font color

TextWindow.WriteLine("Enter your Second Number") 'Ask user to enter Second number

TextWindow.BackgroundColor="cyan" 'Back color

TextWindow.ForegroundColor="blue" 'Font color

number2=TextWindow.Read() ' read the user input and store in number2 variable

Calculation=number1+number2 'Add both number1 and number2 store the result in Calculation

TextWindow.BackgroundColor="yellow" 'Back color

TextWindow.ForegroundColor="red" 'Back color

TextWindow.WriteLine("The result is " + Calculation) ' Display the final result

Copy the above code and paste into your editor.

Run the program

Give your input as a number for first and second number check the calculated result. Here we have given the first number input as 12 and second number input as 8 and so the calculated result you can see in the output.

See Also