TNWiki Article Spotlight: Small Basic - Event Basics


Welcome to Tuesday's TNWiki Article Spotlight!

Today we're going to look at an incredibly helpful TechNet Wiki article from :

Small Basic: Event Basics

  

LitDev takes us through a very thorough look at Events in Small Basic.

The article is made up of four sections:

 

The Other Languages section currently features the French version of this article, translated by Wiki Ninja, :

Small Basic - Les Bases : Les Evènements (fr-FR)

 

Here's the intro section:

 

What is an Event

An event is something that happens independently of the normal flow of instructions in a program.

Often this is when something happens as a result of user interaction, such as when a key is pressed or the mouse is moved or clicked.

Within Small Basic an event method is shown in the intellisense with a lightning symbol shown below.

An event is initialised by defining which subroutine should be called when the event occurs. The assignment of an associated subroutine needs to be set only once. When the event occurs the associated subroutine will be called.

The following is a simple event that creates a pop-up when the mouse is clicked inside the GraphicsWindow.

GraphicsWindow.MouseDown = OnMouseDown
Sub OnMouseDown
  GraphicsWindow.ShowMessage("Mouse was clicked","Information")
EndSub

 

===============

  

To read the other sections and get the latest version of this fantastic article, please see:

Small Basic: Event Basics

 

Thanks again to for this great article and to for translating it into French!

  

Small and Basically yours,

   - Ninja Ed

Comments (4)

  1. Saeid Hasani says:

    Litdev, nice article!
    Thanks Ed for sharing!

  2. You're welcome, Saeid!

    Also Small Basic related, we have a Kinect Extension out for feedback:
    http://blogs.msdn.com/b/smallbasic/archive/2015/04/22/small-basic-try-out-the-new-kinect-extension.aspx

  3. Saeid Hasani says:

    Kinect support is really amazing!

  4. Yes! I think Kinect support is important since the key goal is for Small Basic to be a useful tool for education. What's better than having kids develop motion games for each other? =^)

Skip to main content