none
I/O Extension: Help and Support

    General discussion

  • Hello! Today me and GunGan37 are announcing a new extension: I/O Extension! It allows you to use forms, edit files, get game-controller input, interact with time functions, convert, synthesize speech, and even print! This version is alpha v1.0, so much more is on the way. This extension takes the place of Game-Controller Extension, PlusPlus, and PowerExtension. Please stay tuned, for many more updates are coming! Download today! Also, feel free to give us your feedback and suggestions!

                                                                           


    -Noah J. Buscher "Coding is Art"



    Wednesday, November 14, 2012 1:09 AM

All replies

  • Noah,

    Downloaded fine.  I'm probably doing this wrong.  I just wanted to open a window.

    So:

    IOForms.WindowShow()

    Gets an exception:

    The type initializer for 'IOExtension.IOForms' threw an exception

    at IOExtension.IOForms.WindowShow()

    at _SmallBasicProgram._Main()

    So, how about an example with a radiobutton added or something to get me started.  Looks like you've put in a lot of effort.


    JR

    Wednesday, November 14, 2012 1:38 AM
  • Ah... Me and GunGan37. He wrote the form part. As far as opening a window, you must call IOForms.InitializeForm().  This sets up the window and opens it for you. Thank you for your question! As far as an example, this displays a button:

    IOForms.Setup()
    IOForms.WindowHeight = 549
    IOForms.WindowWidth = 990
    IOForms.AddButon("Button1", "test", 30, 10, 100, 50)
    IOForms.InitializeForm()

    -Noah J. Buscher "Coding is Art"


    Wednesday, November 14, 2012 2:12 AM
  • Hi jricestk! I wrote that class and will give you some pointers:

    * Call IOForms.Setup() before calling anything else in IOForms. This will enable visual styles... without it it will look like your app is on Windows 2000 / 9x. If you want to avoid visual styles, you can leave out the call (for now, all it does is:

    Application.EnableVisualStyles();

    ...maybe more later)

    * Call IOForms.Initialize to pass control to the form. Any code after this, except in "sub" event handlers, will not run: just like in a typical Windows Form! (everything is inside of a function rather than a huge mess). This just calls:

    Application.Run(f1); 

    , where f1 is my main form in the C# class. 

    Also, a sample is available: ZQX928-0.

    (or get the code from below:)

    IOForms.Setup()
    IOForms.WindowHeight = 549
    IOForms.WindowWidth = 990
    IOForms.AddButon("Button1", "test", 10, 10, 100, 50)
    IOForms.AddRadioButton("RadioButton1", "test1", 80, 10)
    IOForms.AddRadioButton("RadioButton2", "test2", 105, 10)
    IOForms.AddLinkLabel("LinkLabel1", "Test", 130, 10, 300, 15)
    IOForms.AddLabel("Label1", "Test", 155, 10, 100, 15)
    IOForms.AddNumericUpDown("NumericUpDown1", 180, 10, 100000, 0, 0)
    IOForms.AddDateTimePicker("DateTimePicker1", 210, 10, 265, 15, 2012, 11, 3, 21, 37, 1)
    IOForms.AddMonthCalendar("MonthCalendar1", 235, 10, 265, 150, 2012, 11, 3)
    IOForms.AddProgressBar("ProgressBar1", 400, 10, 265, 15, 37, "Marquee")
    IOForms.AddTrackBar("TrackBar1", 425, 10, 265, 15, 10)
    IOForms.AddTextBox("TextBox1", 10 , 300, 300, 15, "I am a TextBox.")
    IOForms.AddRichTextBox("RichTextBox1", 50, 300, 300, 50, "I am a (read-only, in this case) RichTextBox.")
    IOForms.RichTextBoxSetIsReadOnly("RichTextBox1", "True")
    aArray[0] = "Option1"
    aArray[1] = "Option2"
    IOForms.AddComboBox("ComboBox1", 150, 300, 300, 15, aArray)
    IOForms.ComboBoxSetDropDownStyle("ComboBox1", "DropDownList")
    IOForms.AddMaskedTextBox("MaskedTextBox1", 210, 300, 300, 15, "", "blah")
    IOForms.AddListView("ListView1", 240, 300, 300, 200)
    IOForms.ListViewAddColumn("ListView1", "ColumnHeader1", 150)
    IOForms.ListViewAddColumn("ListView1", "ColumnHeader2", 150)
    IOForms.ListViewAddItems("ListView1", "0=test1;1=12345;")
    IOForms.ListViewAddItems("ListView1", "0=TEST2;1=3.1415926535;")
    IOForms.ListViewAddItems("ListView1", "0=test3;1=324324;")
    IOForms.AddTreeView("TreeView1", 10, 650, 300, 200)
    IOForms.TreeViewAddNode("TreeView1", "ParentTest1", "ParentTest1")
    IOForms.TreeViewAddChildNode("TreeView1", "ParentTest1", "ChildTest1", "ChildTest1")
    IOForms.TreeViewAddNode("TreeView1", "ParentTest2", "ParentTest2")
    IOForms.TreeViewAddChildNode("TreeView1", "ParentTest2", "ChildTest2", "ChildTest2")
    IOForms.TreeViewAddChildNode("TreeView1", "ParentTest2", "ChildTest3", "ChildTest3")
    IOForms.TreeViewAddChildNode("TreeView1", "ParentTest2", "ChildTest4", "ChildTest4")
    IOForms.TreeViewAddChildNode("TreeView1", "ParentTest2", "ChildTest5", "ChildTest5")
    IOForms.OnButtonClick = BtnClk
    IOForms.AddChart("Chart1", 250, 650, 300, 200)
    IOForms.ChartAddPoint("Chart1", 10, 20)
    IOForms.ChartAddPoint("Chart1", 20, 20)
    IOForms.ChartAddPoint("Chart1", 30, 500)
    IOForms.ChartAddPoint("Chart1", 70, 5000)
    IOForms.ChartAddTitle("Chart1", "TestTitle1", "Verdana", 10.4)
    IOForms.ChartSetStyle("Chart1", "Column", "true", "false", 30, 30, 100, 200)
    IOForms.InitializeForm()
    Sub BtnClk
      TextWindow.WriteLine("Button event fired")
    EndSub
    

    Anyone curious about my code works under the hood can ask here!


    Please mark any answers and "vote as helpful" any posts that help you!



    Wednesday, November 14, 2012 3:14 AM
    Answerer
  • Noah and Gungan37,

    Thanks for the replys.  The reason I was getting the error is that I had only copied the IOExtension.dll and IOExtension.xml.  For this extension to work I also needed to copy the System Windows Forms Data Visualization.dll file.  All of the other extensions work with just 2 files.  This one has to have the 3rd file in the lib folder too.  Noah's example worked after getting all 3 files in the lib folder.  Thanks.


    JR

    Wednesday, November 14, 2012 10:09 AM
  • Gungan37,

    Looks like the verbage for minimum and maximum in the addnumericupdown control intellisense is backward.  It says Minimum, but that's where you put in the maximum value.

    The demo that you put in this thread is great!  Gives a good sample of what can be done with the extension.


    JR

    Thursday, November 15, 2012 12:32 AM
  • Gungan37,

    Looks like the verbage for minimum and maximum in the addnumericupdown control intellisense is backward.  It says Minimum, but that's where you put in the maximum value.

    The demo that you put in this thread is great!  Gives a good sample of what can be done with the extension.


    JR

    I will fix that ASAP! Thanks for pointing that out... I usually copy-paste-modify to make writing the XML documentation bearable, so sometimes mistakes like that happen. I appreciate you sharp eyes! 

    Please mark any answers and "vote as helpful" any posts that help you!

    Thursday, November 15, 2012 12:45 AM
    Answerer
  • GunGan37,

    Also, IOForms.AddButon should be spelled as AddButton.  Button has 2 t's.  Don't want to be picky, but if the spelling is wrong it makes it harder to use. 


    JR

    Thursday, November 15, 2012 1:20 AM
  • GunGan37,

    Also, IOForms.AddButon should be spelled as AddButton.  Button has 2 t's.  Don't want to be picky, but if the spelling is wrong it makes it harder to use. 


    JR

    I totally understand! I fixed it and will commit the source (and zip it up if I have time). The NumericUpDown min/max was not my mistake, but SB's Intellisense's fault:  the params were tagged correctly but in backwards order... Visual Studio accepts that but apparently SB does not. 

    The first mistake was an embarrassing one for me since I am a native English speaker =) I try to catch errors as I type, but in a 4,227 line class like IOForms, something is bound to be misspelled. 

    If there are any more mistakes, please let me know! I appreciate your help here.

     

    Please mark any answers and "vote as helpful" any posts that help you!

    Thursday, November 15, 2012 2:07 AM
    Answerer
  • Link to the CodePlex page isn't working for me right now. Ideas?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Tuesday, December 11, 2012 11:56 PM
    Owner
  • Link to the CodePlex page isn't working for me right now. Ideas?

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Hello Mr. Price! Please check out this thread: http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/a9a9b363-ea92-4a13-8a0b-670c5216162b.

    Please mark any answers and "vote as helpful" any posts that help you!

    Wednesday, December 12, 2012 3:10 AM
    Answerer
  • This is the result of my first try with IOForms. Considering the amount of
    effort that you put into giving the community such good things, I feel badly
    about sending this type of email. I am probably not using the commands as you
    designed them. Your help is greatly appreciated.
     
    later....
     
    '\/ this is the error message that was delivered when the program was
    run.
    Operation 'IOForms.AddLabel' is supplied 6 arguments, but takes 4
    arguments
     
    '\/ this is copied out of the command pane
    IOForms.AddLabel(Name, Text, Top, Left, Width, Height)
     
    '\/ this is copied out of the IDE, i.e., part of the program code
    IOForms.AddLabel("lblTheDay", "This Day:", 1, 1 80, 20)
     
    '\/ this was also copied out of the IDE. It makes no difference what
    numbers
    '\/ are used the window does not open where it is wanted. The goal here is
    to
    '\/ park the window in the upper left corner.
    IOForms.WindowTop = 0

    IOForms.WindowLeft = 0

    The code sample at ZQX928-0 threw the following exceptions:

    4,9 Cannot fine operation 'AddButton' in 'IOForms'

    8,9 Operation 'IOForms.AddLabel' is supplied 6 arguments, but takes 4 arguments

    13,9 Operation 'IOForms.AddTrackBar' is supplied 6 arguments, but takes 8 arguments

    thanks....

    Thursday, January 31, 2013 2:08 PM
  • This is the result of my first try with IOForms. Considering the amount of
    effort that you put into giving the community such good things, I feel badly
    about sending this type of email. I am probably not using the commands as you
    designed them. Your help is greatly appreciated.
     
    later....
     
    '\/ this is the error message that was delivered when the program was
    run.
    Operation 'IOForms.AddLabel' is supplied 6 arguments, but takes 4
    arguments
     
    '\/ this is copied out of the command pane
    IOForms.AddLabel(Name, Text, Top, Left, Width, Height)
     
    '\/ this is copied out of the IDE, i.e., part of the program code
    IOForms.AddLabel("lblTheDay", "This Day:", 1, 1 80, 20)
     
    '\/ this was also copied out of the IDE. It makes no difference what
    numbers
    '\/ are used the window does not open where it is wanted. The goal here is
    to
    '\/ park the window in the upper left corner.
    IOForms.WindowTop = 0

    IOForms.WindowLeft = 0

    The code sample at ZQX928-0 threw the following exceptions:

    4,9 Cannot fine operation 'AddButton' in 'IOForms'

    8,9 Operation 'IOForms.AddLabel' is supplied 6 arguments, but takes 4 arguments

    13,9 Operation 'IOForms.AddTrackBar' is supplied 6 arguments, but takes 8 arguments

    thanks....

    1) Sorry, the XML code for Intellisense here that I wrote is old. The correct args are: AddLabel(Name, Text, Top, Left). So, here is the code for what you need to do:

    AddLabel("lblTheDay", "This Day:", 1, 1)

    2) The problem here is that you are setting the coordinates before the window is created. These values will not do anything unless they are set after the InitializeForm() call. Here is a sample that calls a sub to set the window position on a button click:

    IOForms.Setup()
    IOForms.AddButton("MoveWindow", "Move window", "", 10, 10, 100, 50)
    IOForms.OnButtonClick = ButtonClick
    IOForms.InitializeForm()
    Sub ButtonClick
      IOForms.WindowTop = 0
      IOForms.WindowLeft = 0
      IOForms.ShowMessage(IOForms.WindowTop, "Test", "OK", "", "")
    EndSub
    Please tell me how this works!


    Please mark any answers and "vote as helpful" any posts that help you!

    Friday, February 01, 2013 3:38 AM
    Answerer
  • By the way, this is an old thread. I would rename it to "I/O Extension: Help and Support (OLD THREAD)" but I can't since Noah started the thread and has now deleted his account.

    Please ask future questions here: http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/8a206925-8c0b-4d3c-939d-31cea582ff9e

    Thanks!


    Please mark any answers and "vote as helpful" any posts that help you!

    Friday, February 01, 2013 4:15 AM
    Answerer