The sVB full reference book: https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuXwpvjN
The sVB 2.8.2 installer: https://marketplace.visualstudio.com/items?itemName=ModernVBNET.sVBInstaller
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've built Small Visual Basic (sVB) on top of Small Basic, with many enhancements in syntax and code editor, in addition to an easy to use form designer and a small windows forms library.
sVB is still a dynamic language, but it offers good support for basic data types like String, Double, Date, Array and Color by inferring the variable type from its initial value.
sVB is semi object oriented, as it makes variables act like objects by accessing extension methods from Text, Math, Date, Array, Color and Control classes. All of this happens behind the scene to make the code shorter and easier for kids. The kid has only to drag a TextBox and a Button on the form, double click the button to switch to its click event handler, and write the code directly, such as:
TextBox1.Text = "Hello sVB!"
The source code of sVB is fully written in VB .NET:
https://github.com/VBAndCs/sVB-Small-Visual-Basic
So, can MS introduce this enhanced version to kids?
It is compatible with SB with a few breaking changes (esp variable domains), and it can be more attractive to nowadays kids, that kept asking me about opening new forms, dealing with dates, and using AI (the latter is still missing of course, and this is why kids are eager to learn Python, and thi sis why I am thinking of some support of ML.NET in sVB in the future!)
The sVB full reference book: https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuXwpvjN
The sVB 2.8.2 installer: https://marketplace.visualstudio.com/items?itemName=ModernVBNET.sVBInstaller
In sVB 2.9, The form designer now has a menu designer, which allows you to add menu items and set their properties like name, title, and shoutcut keys. To show the menu designer, right-click the form surface and click the "Menu Designer" command from the context menu.
After closing the menu designer, menu items willl appear on top of the form designer, where you can click any of them to add its OnClick event handler to the code editor. You can also double-click main menu items to add its OnOpen event handler to the code editor.
Using the designer to set the shortcut keys for the menu items makes the form auto-handle these keys for you without having to write any more code for them. See the "sVB Notepad 2" application in the samples folder, where the menus are created by the menu designer, and compare that to the rewrote the "sVB Notepad" application where they are crated by code.
I just published the first book of the "Small Visual Basic Kid Programmer" series on Amazon.
Small Visual Basic 3.0 says: Happy BASIC 60th anniversary to all!
sVB 3.0 has a stable debugger plus many other improvements.
The language now is complete. I hope you find it useful.
I just released a new update to sVB (v 3.0.2) with 2 important new features:
Thread.SubToRun = Task1
Thread.SubToRun = Task2
Ti see this in action, import this version of the "Mandelbrot Set" by the ID: KTWP743.000
I am using 30 threads to draw the shape you see in the picture, which saves about 35% of the time.
This is the code that run the threads:
For Y = 0 To GraphicsWindow.Height Step 20
CurY = Y
Thread.SubToRun = DrawPixel
Next
Take care not to create too many threads (at most 100 threads and the lesser the better) because that can make your system hang or block some of these threads.
Note also that you can't pass arguments to the handler, so you will need to use global variables. This method will pause your code for 10ms to allow the new thread to start and read the global variables, but if this is not enough, you may need to call Program.Delay to increase the delay.
The sVB samples folder has a more advanced version of the "Mandelbrot Set" project.