Instructions:
- Expand the Assets list at the bottom of the page and download the ZIP file.
- Unzip the
sVB.zip
file. You will have a folder with the same name where you unzipped the file. Open the folder and double-clicksVB.exe
. - sVB needs .NET framework 4.8. If you don't have it on your PC, download and install it:
https://go.microsoft.com/fwlink/?LinkId=2085155 - The samples folder in sVB folder contains many samples that covers the language features.
- Click the
Form code
tab at the top of the window to switch to the sb code editor.
Note that you can right-click any.sb
file and choseopen with
from the context menu, then choose sVB.exe as the default program to open.sb
files. After that you can just double-click any.sb
file to open it in sVB. - For more info about sVB syntax see the ReadMe file
What’s new in sVB 2.7:
1- Fixing many small bugs while adding tests to the sVB Tests
projet.
2- sVb gave some love to the graphics window, so now you can use the Controls.AddXX methods to add many controls on the graphics window, and use them in the same way you do when you add them on any other form. For example, you can add a ComboBox on the graphics window, add items to it and select the second item like this:
Combo = Controls.AddComboBox(50, 50, 100, -1)
Combo.AddItem({10, 20, 30})
Combo.SelectedIndex = 2
you can also handle the ComboBox events like this:
Combo.OnSelection = Combo_Selected
Sub Combo_Selected()
GraphicsWindow.ShowMessage(Combo.SelectedItem, Combo.SelectedIndex)
EndSub
For more info about the new available controls, try these methods:
- Controls.AddCheckBox
- Controls.AddComboBox
- Controls.AddDatePicker
- Controls.AddLabel
- Controls.AddListBox
- Controls.AddProgressBar
- Controls.AddRadioButton
- Controls.AddScrollBar
- Controls.AddSlider
- Controls.AddTimer
- Controls.AddToggleButton
- Array initializer is now too fast, so you can use it to populate the array with tens of thousands of items in less than a second, which was very slow in previous sVB versions.
Note that the array indexer is still too slow, so you should avid it if you want to construct a large array in a loop, and instead use this:
St = Date.Now
X[1] = 1
For I = 2 To 1000000
X.AddNextItem(I)
Next
Me.ShowMessage(Date.Now - St, "")
Note that the Array.AddNextItem method will cause an error if the array is empty, so you have to add the first item using the indexer out of the loop.
You should also use a similar code to modify the array. Suppose we want to multiply each item in the previous array by 2. To do so, we need to construct a new array (say y) with the new values, then pas it back to x. This is more than 1000 times faster than using the indexer directly:
St = Date.Now
Y[1] = X[1] * 2
For I = 2 To 1000000
Y.AddNextItem(X[I] * 2)
Next
X = Y
Me.ShowMessage(Date.Now - St, "")