Page 2 of 2 FirstFirst 12
Results 41 to 57 of 57

Thread: Small Visual Basic: an educational language for kids and beginners

  1. #41

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Visual Small Basic v1.8.5 for kids and beginners

    Quote Originally Posted by Peter Swinkels View Post
    a manual would be useful. With a quick reference guide.
    This is the sVB full reference book

    Attachment 187643

  2. #42

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    In sVB v2.8.4, you can use the turtle to fill an area, by calling the CreateFigure and FillFigure methods.
    X = Turtle.X
    Y = Turtle.Y
    Turtle.CreateFigure()
    Turtle.Move(200)
    Turtle.TurnRight()
    Turtle.Move(200)
    Turtle.TurnRight()
    Turtle.Move(200)
    Turtle.TurnRight()
    Turtle.Move(200)
    Turtle.FillFigure()
    Turtle.CreateFigure()
    Turtle.TurnLeft()
    Turtle.Move(200)
    Turtle.MoveTo(200, 200)
    Turtle.MoveTo(350, 200)
    Turtle.MoveTo(X, Y)
    GraphicsWindow.BrushColor = Colors.Red
    Turtle.FillFigure()

  3. #43

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    What's new in the latest sVB update:
    * 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.
    * If the sVB crashed, it will restore last unsaved projects when you reopens it.
    * sVB now has the Evaluator lib, 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:
    Code:
    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.

  4. #44
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,563

    Re: Small Visual Basic: an educational language for kids and beginners

    Ah yes the turtle... I think it was either K or 1st grade we had our first computer class, where we played with LOGO on some green screened Macs. This looks a lot more engaging; my interest in coding wasn't really piqued until middle school with programming my calculator, making web pages, and AOL proggies. Keep up the good work

  5. #45

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    Quote Originally Posted by fafalone View Post
    Ah yes the turtle... I think it was either K or 1st grade we had our first computer class, where we played with LOGO on some green screened Macs. This looks a lot more engaging; my interest in coding wasn't really piqued until middle school with programming my calculator, making web pages, and AOL proggies. Keep up the good work
    I first used Logo and GWBASIC in 1993, 30 years ago, in 10th grade! I studied Pascal, C++ and Prolog in collage, but I didn't become a programmer until I learned VB4 and fall in love with its simplicity and productivity. This why I decided to evolve Small basic to be so close to VB6 in Small Visual Basic.
    Thanks.

  6. #46

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    I've updated sVB to the version 2.8.7.3 to fix minor bugs:
    https://marketplace.visualstudio.com...T.sVBInstaller

  7. #47
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,218

    Re: Small Visual Basic: an educational language for kids and beginners

    Perhaps you should work hand in hand with the TwinBasic/RadBasic chaps, offering a teaching/migration path from SmallBasic to BigBasics such as those two more 'grown-up' offerings. It would seem wise to avoid any particular syntactical differences, so that the migration path is kept simple. The synergy of co-existence and cross pollination might create an ecosystem that would cause each to thrive all the more.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  8. #48
    Fanatic Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    981

    Re: Small Visual Basic: an educational language for kids and beginners

    Or even try to resurrect ANSI X3.113 standard which describes 'Basic'.
    https://ia600103.us.archive.org/26/i...6821nati_0.pdf
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  9. #49

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    Quote Originally Posted by yereverluvinuncleber View Post
    Perhaps you should work hand in hand with the TwinBasic/RadBasic chaps, offering a teaching/migration path from SmallBasic to BigBasics such as those two more 'grown-up' offerings. It would seem wise to avoid any particular syntactical differences, so that the migration path is kept simple. The synergy of co-existence and cross pollination might create an ecosystem that would cause each to thrive all the more.
    The thaught has crossed my mind, but sVB is a .NET language, and its API is so close to WinForms with flavors of WPF, so, the next logical choice is VB .NET. But this doesn't mean I closed the path to VB6 successors, as the IDE is more close to VB6, and I am using the same event handlers naming conversion of VB6, and restored the "While Wend" block because I never liked the "While EndWhile" (although I kept it for backward compatibility with Small Basic).
    Anyway, learning the basic programming concepts with any language will make it easy to learn any other language later, and sVB works in favor for all BASIC dialects for sure.
    Currently, I am not planning for any new syntax features, to keep the language as simple as it is, but I am working on improving the IDE. I am creating a small properties window now so the kid can write less code, and will add a menu designer later because creating menus with code needs tens of code lines. It is important also to add a debugger (SB code includes the basic structure of it but it is not activated and I need to modify it to work with new sVB syntax).
    Finally, the most important feature is to make sVB versions that can run on Linux, macOS, iOS and android to be reachable to more kids.
    Thanks

  10. #50

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    Quote Originally Posted by 2kaud View Post
    Or even try to resurrect ANSI X3.113 standard which describes 'Basic'.
    https://ia600103.us.archive.org/26/i...6821nati_0.pdf
    I am using Small Basic, VB6 and VB .NET as my standards. Small Basic has some nice syntax features that I like, such as:
    * using [] to index arrays.
    * using the = to add event handlers instead of VB.NET verbs syntax and the C# += confusing syntax.
    * using one word keywords like EndSub instead of End Sub.
    Other than that, I am following VB6 and VB.NET syntax. The above replay explains why.
    Thanks.

  11. #51

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    What's new In sVB 2.8.8:
    * Fixing some reported bugs.

    * In the form designer, you can drag images from your file system and drop them on the form design surface to show them in labels.

    * In code, you can use the * operator to duplicate strings like in Python. Ex:
    TextWindow.WriteLine("{*} " * 10)
    The above code will ill print:
    {*} {*} {*} {*} {*} {*} {*} {*} {*} {*}

    * Adding the Sound.Resume method to resume playing a paused audio. The Sound.Play method behavior has been changed in a previous version to stop the currently played audio before playing the new one, and this prevents resuming paused files as was in SB, to prevent some issues when frequently playing the same audio in short intervals which for some reason causes the audio to stop permanently!

    * The event system has many improvements like:
    1. Registering only one handler for each event. In previous versions, adding the same handler twice for the same event, fire the event twice, and adding two different handlers for the same event, makes both of them be called when the event is fired! This is not the case now in sVB 2.8.8, since the only handler used is the last one assigned to the event.
    2. Adding the Event.LastMouseWheelDirection to be used with the OnMouseWheel event. Without this property, this event was useless!
    3. Adding the Form.OnPreviewMouseWheel event.
    4. Moving the OnPreviewKeyUp and OnPreviewKeyDown events from the Control to the Form.
    5. In the code editor, the event-handlers list now allows to select the handler name when the user presses a character that matches any uppercase character in the handler name. For example, pressing the character a can select a subroutine named Test_Addition, and pressing k can select the OnKeyUp event.

  12. #52
    Fanatic Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    981

    Re: Small Visual Basic: an educational language for kids and beginners

    With the release of Raspberry pi 5, have you thought about porting SVB to the Raspberry as Raspberry pi os is based upon Linux Debian?
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  13. #53

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    Quote Originally Posted by 2kaud View Post
    With the release of Raspberry pi 5, have you thought about porting SVB to the Raspberry as Raspberry pi os is based upon Linux Debian?
    I never used Raspberry pi and I may have seen Linux OS omce or twice in all my life! I am a Microsoft citizen, and my area of expertise is within Dot NET, which I will use to build sVB versions for other platforms. This is possible using C# but I want all source code to be in VB.NET, so I want to Use the upcoming ModVB (Modern VB.NET) or I may think about Avalonia UI, OpenSliver or other .NET frameworks to do that, but I prefer to support ModVB.

    But, I am not against any idea. I puplished the source code so any one can take it anywhere he wants. After all I am just one man with limited time and power, so I welcome any help in taking sVB to other devices and operating systems.
    Thanks.

  14. #54

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    More improvements in event handling system in sVB 2.8.8.1:
    In sVB 2.8.8, each event can have only one handler, but this caused issues when passing a control to a method from another library (like Geometrics.AllowDrag) that add handlers to some of that control's events (like OnMouseLeftDown and OnMouseMove) because if you add handlers to the same events in you program they will cancel the library handlers!
    Using one e4vent handler makes sense in the same code domain (program/lib) because sVB doesn't have a syntax to remove handlers. But having more handlers to the same event from another lib is a useful things, so sVB 2.8.8.1 allowed it now.
    Also, controls now have the SendToBack and BringToFront methods.
    Last edited by M.Hamdy; Jan 5th, 2024 at 05:20 PM.

  15. #55

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    I just added the new keyword Nothing to Small Visual Basic. sVB 2.8.8.2 now contains 28 keywords (twice the 14 SB keywords)
    Nothing is used in VB .NET as a bull object or a default value. I use it in sVB to set a null object to an event, to remove its handler. This works for both sVB controls and old Small Basic events like Timer.Tick and Controls.ButtonClicked.

  16. #56

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    It is the 3rd anniversary since I announced the first prove of concept of sVB, and now sVB reached its 2.8.9 version, which finally got a small properties window.
    Also, sVB got the string concatenation operator &
    Happy birth day sVB!
    Download the sVB 2.8.9 installer.
    Attachment 189884

  17. #57

    Thread Starter
    Lively Member
    Join Date
    Apr 2020
    Posts
    83

    Re: Small Visual Basic: an educational language for kids and beginners

    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. 1d

    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. User's image

    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.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width