Quantcast
Channel: Small Basic
Viewing all articles
Browse latest Browse all 669

Event Basics - Small Basic Featured Article

$
0
0

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


Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>