Skip to content

Small Visual Basic v2.8.7

Latest
Compare
Choose a tag to compare
@VBAndCs VBAndCs released this 11 May 06:52
· 52 commits to master since this release
  • This version contains many bug fixes, language enhancements, and the sVB full reference PDF book.

  • Starting from v2.8.1, sVB has an installer, that creates a startup menus and desktop shortcuts.

  • Starting from v2.8.4, the turtle can fill an area, by calling the CreateFigure and FillFigure methods.

  • When you install sVB, you will find a sVB docs.pdffile in its directory, and you will find a shortcut for it in the Small Visual Basic folder in the start menu, and another one on the desktop. You can find this file also in the root folder of the sVB repo. This is a 750 pages books, that contains the full details about the sVB IDE, syntax, and class library with full examples and helpful notes about the projects you can find in the sVB samples folder.

  • sVB 2.8.4.3 fixes a Small Basic Bug related to the Sound.Play and Sound.Stop methods.

  • sVB 2.8.5 fixes a bug that happens when trying to change the grid lines thickness in the form designer, and adds the GraphicsWindow.FullScreen property. It also allows you to use relative file names when you load an image in the ImageList or playing a sound file.

  • sVB 2.8.5.5 fixes a bug that happens when the sVB object syntax that ends with a comment is lowered to the SB static (shared) syntax. It also allows your form to reopen the graphics window after the user closes it.

  • In sVB 2.8.5.6, you can change the Turtle size by using Turtle.Width or Turtle.Height. Also, you don't need any more to call Sound.Stop(soundFiile) before playing it, as the Sound.Play(soundFiile) method will make sure to stop the file first.

  • sVB 2.8.5.7 fixes a form designer bug, where deleting a control could set its name to the next one!

  • sVB 2.8.6 adds Sound.Load method and enhances saving relative images in the form designer.

  • In sVB 2.8.6.1 You can use GW and TW as shortcuts for GraphicsWindow and TextWindow. Also, the GraphicsWindow will be shown in the maximized state by default, but when you set the Width or height properties, it will restore its normal state.

  • In sVB 2.8.6.2 you can use the Turtle.DirectMove, Turtle.DirectMoveTo and Turtle.DirectTurn to avoid the animation overhead when you use the turtle to draw curves. This will make the turtle super fast.
    You can also use the Sound.Load(fileName) to load a sound file to avoid the laoding delay when you first play the sound. This method is added in a previous version, but in this version its return value is modified to be inferred as a sound object, which you can use to directly access the Play, PlayAndWait, Pause and Stop methods as instant methods without the need to send the file name. Ex:

boingSound = Sound.Load("boing.wav")
boingSound.Play()
  • In sVB 2.8.6.3 you can set the Turtle.UseAnimation property to false, to force its Move, MoveTo and Turn methods to call the DirectMove, DirectMoveTo and DirectTurn methods to avoid using animation.
  • sVB 2.8.6.4 restores last unsaved projects if the sVB crashed.
  • sVB 2.8.6.5 introduces the Evaluator type, which allows you to evaluate mathematical expressions at runtime:
    • Use the Expression Property to set the mathematical expression. The expression can contain only one input variable named X.
    • Use the Evaluate method to calculate the value of the expression at the given value of x.
    Example:
Evaluator.Expression = "(x^2 + 1) * Abs(-x + 5) / 4"
TextWindow.WriteLines({
   Evaluator.Evaluate(-1),
   Evaluator.Evaluate(0),
   Evaluator.Evaluate(37)
})

You can allow the user to provide any expression he wants, so you can evaluate it at some values. You can use this to create an application that draws functions provided by the user. This is exactly what the "Draw Functions" project in the samples folder does, so please take a look at.

image

image