none
Create extension for Small Basic in Small Basic

    General discussion

  • [EDIT -- This program is not supported anymore in the latest version of SmallBasic; The only workaround is to 'Upgrade SmallBasic code to VB.NET' and perform some minor changes before compiling]

     

    It's possible to create extensions for Small Basic in any DotNet language. This includes Visual Basic .NET and C#. But this also includes Small Basic itself.

    http://cid-201f3835d49587fe.skydrive.live.com/self.aspx/Public/Small%20Basic/SmallBasicExtensionCompiler.zip

    Creating an extension in Small Basic is very simple : Just create your program and compile it with this special compiler. You'll get two new files : <File>.dll and <File>.pdg. Copy those files in C:\Microsoft\Small Basic\lib\ and launch Small Basic. It's all you need !

    To create sub/variables that are not accessible for other apps, start their name by an underscore '_'.

    Sample (Test.sb) :

    MyField = "(No value)"
    _MyPrivateField = "Value of MyField : "

    Sub TestSub
      TextWindow.Write(_MyPrivateField)
      TextWindow.WriteLine(MyField)
    EndSub


    Application using Test.sb 

     

    Test.Testsub()
    Test.Myfield = 5
    Test.Testsub()

    ' Few remarks :
    ' ===========
    ' * Test._MyPrviateField isn't accessible, because it begins by a '_'
    ' * All sub/variable names are capitalized to Mmmm... (M: MAJ, m: min)
    ' * Your program (Extension) is run just before the first time you use the extension  object

    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension
    Friday, August 21, 2009 4:20 PM

All replies

  • How do you include  the test,dll in your code?  I think you missed a line?  This is a great help though!
    Thursday, October 29, 2009 11:00 PM
  • How do you include  the test,dll in your code?  I think you missed a line?  This is a great help though!

    Are you trying to use this with Small Basic v0.7?  If so, it will not work.  It will only work with v0.6.  Fremy will have to update this program, as well as his other extension before they will work with v0.7.

    Thursday, October 29, 2009 11:14 PM
  • I'll perform an update soon. Please keep updated...
    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension
    Friday, October 30, 2009 2:51 PM
  • I'll try to perform the update tomorrow. If everyting goes right, it should be done for monday morning.
    If I face problems, I'll try to fix these before Wednesday.

    Keep updated,
    Fremy


    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension
    Saturday, November 07, 2009 4:33 PM
  • Just to find out, have you made this to work for v0.7 yet?

    31337 - everything can be solved... the impossible just takes longer.
    Saturday, November 28, 2009 8:20 AM
  • That's just genius! does that work with 0.9?

    |"| /"/|"""\ /"""\|"| |__ __| /\ |"""\ |"| | |/ / | " / | | || | | | / \ | |\ \ | | | |\ \ | | \ | | || |__ | | / \ | | \ \| | |_| \_\|_|\_\\___/|____| |_| /_/""\_\|_| \___|
    Tuesday, July 13, 2010 10:56 PM
  • No, it will not work with the latest version, and I've no plan to modify the program to support it. The best way to perform that is simply to graduate your project in VB and add some attributes (see add-on reference) around generated classes.
    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension
    Wednesday, July 14, 2010 5:21 AM
  • Thank you for reply...

    :( this program is so genius...

    and wheres the addon reference?

     


    |"| /"/|"""\ /"""\|"| |__ __| /\ |"""\ |"| | |/ / | " / | | || | | | / \ | |\ \ | | | |\ \ | | \ | | || |__ | | / \ | | \ \| | |_| \_\|_|\_\\___/|____| |_| /_/""\_\|_| \___|
    Wednesday, July 14, 2010 5:02 PM

  • Is the link expired? The link cannot be opened.
    Thursday, January 06, 2011 1:19 AM
  • The link works right for me
    ~~AirWaves!!~~
    Thursday, January 06, 2011 6:36 AM
  • Airwaves, "Is the link expired" is one of the common phrases used by hidden link seo spammers. These spammers do not understand technical questions so they use vargue words that fit every forum.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, January 25, 2011 3:02 AM