Author Topic: Just for fun: An example of what InForm is *NOT* for  (Read 193 times)

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Just for fun: An example of what InForm is *NOT* for
« on: June 11, 2018, 01:54:28 AM »
Form files should have the .frm extension.

Code: [Select]
': This form was generated by
': InForm - GUI library for QB64 - Beta version 8
': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------
SUB __UI_LoadForm

    DIM __UI_NewID AS LONG

    __UI_NewID = __UI_NewControl(__UI_Type_Form, "Frog", 605, 300, 0, 0, 0)
    SetCaption __UI_NewID, "Frog"
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).Font = SetFont("arial.ttf", 12)

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox5", 608, 150, 0, 0, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(0, 0, 96)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox6", 606, 150, 0, 150, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(0, 0, 139)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox9", 66, 150, 481, 150, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(132, 131, 131)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox7", 264, 50, 15, 211, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(175, 129, 70)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox2", 186, 138, 39, 96, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(48, 119, 85)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox1", 147, 138, 104, 52, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(48, 141, 85)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_ProgressBar, "ProgressBar1", 105, 23, 125, 143, 0)
    SetCaption __UI_NewID, "\#"
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).Value = 100
    Control(__UI_NewID).Max = 100

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox3", 95, 24, 167, 224, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(18, 90, 36)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox4", 95, 24, 53, 224, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).BackColor = _RGB32(18, 90, 36)
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox8", 67, 59, 481, 15, 0)
    Control(__UI_NewID).Stretch = True
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB", 34, 38, 104, 0, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB2", 34, 38, 132,-1, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB3", 34, 38, 170, 0, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB4", 34, 38, 118, 14, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB5", 34, 38, 151, 14, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB6", 34, 38, 209, 9, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB7", 34, 38, 224,-8, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB8", 34, 38, 179, 21, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB9", 34, 38, 257, 23, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB10", 34, 38, 258, 66, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB11", 34, 38, 266, 95, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB12", 34, 38, 288,-4, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB13", 34, 38, 236, 10, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB14", 34, 38, 269, 10, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB15", 34, 38, 327, 5, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB16", 34, 38, 342,-12, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB17", 34, 38, 297, 17, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB18", 34, 38, 375, 19, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB19", 34, 38, 376, 62, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB20", 34, 38, 384, 91, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB21", 34, 38, 474,-8, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB22", 34, 38, 422, 6, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB23", 34, 38, 455, 6, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB24", 34, 38, 513, 1, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB25", 34, 38, 528,-16, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB26", 34, 38, 483, 13, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB27", 34, 38, 561, 15, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB28", 34, 38, 562, 58, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB29", 34, 38, 570, 87, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB30", 34, 38, 343, 20, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB31", 34, 38, 291, 34, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB32", 34, 38, 324, 34, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB33", 34, 38, 382, 29, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB34", 34, 38, 397, 12, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB35", 34, 38, 352, 41, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB36", 34, 38, 430, 43, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB37", 34, 38, 431, 86, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB38", 34, 38, 439, 115, 0)
    SetCaption __UI_NewID, "."
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
    Control(__UI_NewID).BackStyle = __UI_Transparent
    Control(__UI_NewID).Align = __UI_Center
    Control(__UI_NewID).VAlign = __UI_Middle

    __UI_NewID = __UI_NewControl(__UI_Type_ToggleSwitch, "ToggleSwitch2", 40, 17, 185, 96, 0)
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).SelectedForeColor = _RGB32(0, 0, 0)
    Control(__UI_NewID).SelectedBackColor = _RGB32(220, 239, 216)
    Control(__UI_NewID).Value = -1
    Control(__UI_NewID).CanHaveFocus = True

    __UI_NewID = __UI_NewControl(__UI_Type_ToggleSwitch, "ToggleSwitch4", 40, 17, 139, 96, 0)
    Control(__UI_NewID).Stretch = False
    Control(__UI_NewID).SelectedForeColor = _RGB32(0, 0, 0)
    Control(__UI_NewID).SelectedBackColor = _RGB32(220, 239, 216)
    Control(__UI_NewID).Value = -1
    Control(__UI_NewID).CanHaveFocus = True

END SUB

SUB __UI_AssignIDs
    Frog = __UI_GetID("Frog")
    PictureBox5 = __UI_GetID("PictureBox5")
    PictureBox6 = __UI_GetID("PictureBox6")
    PictureBox9 = __UI_GetID("PictureBox9")
    PictureBox7 = __UI_GetID("PictureBox7")
    PictureBox2 = __UI_GetID("PictureBox2")
    PictureBox1 = __UI_GetID("PictureBox1")
    ProgressBar1 = __UI_GetID("ProgressBar1")
    PictureBox3 = __UI_GetID("PictureBox3")
    PictureBox4 = __UI_GetID("PictureBox4")
    PictureBox8 = __UI_GetID("PictureBox8")
    LB = __UI_GetID("LB")
    LB2 = __UI_GetID("LB2")
    LB3 = __UI_GetID("LB3")
    LB4 = __UI_GetID("LB4")
    LB5 = __UI_GetID("LB5")
    LB6 = __UI_GetID("LB6")
    LB7 = __UI_GetID("LB7")
    LB8 = __UI_GetID("LB8")
    LB9 = __UI_GetID("LB9")
    LB10 = __UI_GetID("LB10")
    LB11 = __UI_GetID("LB11")
    LB12 = __UI_GetID("LB12")
    LB13 = __UI_GetID("LB13")
    LB14 = __UI_GetID("LB14")
    LB15 = __UI_GetID("LB15")
    LB16 = __UI_GetID("LB16")
    LB17 = __UI_GetID("LB17")
    LB18 = __UI_GetID("LB18")
    LB19 = __UI_GetID("LB19")
    LB20 = __UI_GetID("LB20")
    LB21 = __UI_GetID("LB21")
    LB22 = __UI_GetID("LB22")
    LB23 = __UI_GetID("LB23")
    LB24 = __UI_GetID("LB24")
    LB25 = __UI_GetID("LB25")
    LB26 = __UI_GetID("LB26")
    LB27 = __UI_GetID("LB27")
    LB28 = __UI_GetID("LB28")
    LB29 = __UI_GetID("LB29")
    LB30 = __UI_GetID("LB30")
    LB31 = __UI_GetID("LB31")
    LB32 = __UI_GetID("LB32")
    LB33 = __UI_GetID("LB33")
    LB34 = __UI_GetID("LB34")
    LB35 = __UI_GetID("LB35")
    LB36 = __UI_GetID("LB36")
    LB37 = __UI_GetID("LB37")
    LB38 = __UI_GetID("LB38")
    ToggleSwitch2 = __UI_GetID("ToggleSwitch2")
    ToggleSwitch4 = __UI_GetID("ToggleSwitch4")
END SUB
« Last Edit: June 11, 2018, 01:58:57 AM by FellippeHeitor »

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #1 on: June 11, 2018, 11:15:51 AM »
Uh... what is the fun part of this? :)
B = B + ...

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #2 on: June 11, 2018, 11:36:44 AM »
Loading it.

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #3 on: June 11, 2018, 11:41:40 AM »
Loading it.

? Mine loaded normally (I copy / pasted in your code) and then IDE proceeded to red line the first line in first event sub.
B = B + ...

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #4 on: June 11, 2018, 12:07:11 PM »
Loading into InForm, bplus. It was supposed to be a joke, but then one explains it...

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #5 on: June 11, 2018, 01:26:13 PM »
Ha well the joke's on me!

I knew something funny was up posting in this board and the "Just for fun:" in title.
You know me, I hate to miss out on any fun when it comes to coding...

It was the frog that made me actually try it. Yeah, I blame the frog!


Oh wait... load it into the UiEditor, ah now I see... I think I will move the progress bar a bit and give it a text box or label.
« Last Edit: June 11, 2018, 01:43:01 PM by bplus »
B = B + ...

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #6 on: June 11, 2018, 01:39:21 PM »
If you save with InForm and then compile the resulting .bas, you can make the frog look left and right since his eyes are ToggleSwitch controls.

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #7 on: June 11, 2018, 02:47:52 PM »
"Action"
Code: [Select]
'frog.bas add action to Fellippe's .frm
': This program uses
': InForm - GUI library for QB64 - Beta version 7
': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------

': Controls' IDs: ------------------------------------------------------------------
DIM SHARED Frog AS LONG
DIM SHARED PictureBox5 AS LONG
DIM SHARED PictureBox6 AS LONG
DIM SHARED PictureBox9 AS LONG
DIM SHARED PictureBox7 AS LONG
DIM SHARED PictureBox2 AS LONG
DIM SHARED PictureBox1 AS LONG
DIM SHARED ProgressBar1 AS LONG
DIM SHARED PictureBox3 AS LONG
DIM SHARED PictureBox4 AS LONG
DIM SHARED PictureBox8 AS LONG
DIM SHARED LB AS LONG
DIM SHARED LB2 AS LONG
DIM SHARED LB3 AS LONG
DIM SHARED LB4 AS LONG
DIM SHARED LB5 AS LONG
DIM SHARED LB6 AS LONG
DIM SHARED LB7 AS LONG
DIM SHARED LB8 AS LONG
DIM SHARED LB9 AS LONG
DIM SHARED LB10 AS LONG
DIM SHARED LB11 AS LONG
DIM SHARED LB12 AS LONG
DIM SHARED LB13 AS LONG
DIM SHARED LB14 AS LONG
DIM SHARED LB15 AS LONG
DIM SHARED LB16 AS LONG
DIM SHARED LB17 AS LONG
DIM SHARED LB18 AS LONG
DIM SHARED LB19 AS LONG
DIM SHARED LB20 AS LONG
DIM SHARED LB21 AS LONG
DIM SHARED LB22 AS LONG
DIM SHARED LB23 AS LONG
DIM SHARED LB24 AS LONG
DIM SHARED LB25 AS LONG
DIM SHARED LB26 AS LONG
DIM SHARED LB27 AS LONG
DIM SHARED LB28 AS LONG
DIM SHARED LB29 AS LONG
DIM SHARED LB30 AS LONG
DIM SHARED LB31 AS LONG
DIM SHARED LB32 AS LONG
DIM SHARED LB33 AS LONG
DIM SHARED LB34 AS LONG
DIM SHARED LB35 AS LONG
DIM SHARED LB36 AS LONG
DIM SHARED LB37 AS LONG
DIM SHARED LB38 AS LONG
DIM SHARED ToggleSwitch2 AS LONG
DIM SHARED ToggleSwitch4 AS LONG
DIM SHARED lpCnt
': External modules: ---------------------------------------------------------------
'$INCLUDE:'InForm\InForm.ui'
'$INCLUDE:'InForm\xp.uitheme'
'$INCLUDE:'Frog.frm'

': Event procedures: ---------------------------------------------------------------
SUB __UI_BeforeInit

END SUB

SUB __UI_OnLoad

END SUB

SUB __UI_BeforeUpdateDisplay
    'This event occurs at approximately 30 frames per second.
    'You can change the update frequency by calling SetFrameRate DesiredRate%
    lpCnt = lpCnt + 1
    r = INT(RND * 38) + 1
    SELECT CASE r
        CASE 1: IF Caption(LB) = "ribbit" THEN Caption(LB) = "." ELSE Caption(LB) = "ribbit"
        CASE 2: IF Caption(LB2) = "ribbit" THEN Caption(LB2) = "." ELSE Caption(LB2) = "ribbit"
        CASE 3: IF Caption(LB3) = "ribbit" THEN Caption(LB3) = "." ELSE Caption(LB3) = "ribbit"
        CASE 4: IF Caption(LB4) = "ribbit" THEN Caption(LB4) = "." ELSE Caption(LB4) = "ribbit"
        CASE 5: IF Caption(LB5) = "ribbit" THEN Caption(LB5) = "." ELSE Caption(LB5) = "ribbit"
        CASE 6: IF Caption(LB6) = "ribbit" THEN Caption(LB6) = "." ELSE Caption(LB6) = "ribbit"
        CASE 7: IF Caption(LB7) = "ribbit" THEN Caption(LB7) = "." ELSE Caption(LB7) = "ribbit"
        CASE 8: IF Caption(LB8) = "ribbit" THEN Caption(LB8) = "." ELSE Caption(LB8) = "ribbit"
        CASE 9: IF Caption(LB9) = "ribbit" THEN Caption(LB9) = "." ELSE Caption(LB9) = "ribbit"
        CASE 10: IF Caption(LB10) = "ribbit" THEN Caption(LB10) = "." ELSE Caption(LB10) = "ribbit"
        CASE 11: IF Caption(LB11) = "ribbit" THEN Caption(LB11) = "." ELSE Caption(LB11) = "ribbit"
        CASE 12: IF Caption(LB12) = "ribbit" THEN Caption(LB12) = "." ELSE Caption(LB12) = "ribbit"
        CASE 13: IF Caption(LB13) = "ribbit" THEN Caption(LB13) = "." ELSE Caption(LB13) = "ribbit"
        CASE 14: IF Caption(LB14) = "ribbit" THEN Caption(LB14) = "." ELSE Caption(LB14) = "ribbit"
        CASE 15: IF Caption(LB15) = "ribbit" THEN Caption(LB15) = "." ELSE Caption(LB15) = "ribbit"
        CASE 16: IF Caption(LB16) = "ribbit" THEN Caption(LB16) = "." ELSE Caption(LB16) = "ribbit"
        CASE 17: IF Caption(LB17) = "ribbit" THEN Caption(LB17) = "." ELSE Caption(LB17) = "ribbit"
        CASE 18: IF Caption(LB18) = "ribbit" THEN Caption(LB18) = "." ELSE Caption(LB18) = "ribbit"
        CASE 19: IF Caption(LB19) = "ribbit" THEN Caption(LB19) = "." ELSE Caption(LB19) = "ribbit"
        CASE 20: IF Caption(LB20) = "ribbit" THEN Caption(LB20) = "." ELSE Caption(LB20) = "ribbit"
        CASE 21: IF Caption(LB21) = "ribbit" THEN Caption(LB21) = "." ELSE Caption(LB21) = "ribbit"
        CASE 22: IF Caption(LB22) = "ribbit" THEN Caption(LB22) = "." ELSE Caption(LB22) = "ribbit"
        CASE 23: IF Caption(LB23) = "ribbit" THEN Caption(LB23) = "." ELSE Caption(LB23) = "ribbit"
        CASE 24: IF Caption(LB24) = "ribbit" THEN Caption(LB24) = "." ELSE Caption(LB24) = "ribbit"
        CASE 25: IF Caption(LB25) = "ribbit" THEN Caption(LB25) = "." ELSE Caption(LB25) = "ribbit"
        CASE 26: IF Caption(LB26) = "ribbit" THEN Caption(LB26) = "." ELSE Caption(LB26) = "ribbit"
        CASE 27: IF Caption(LB27) = "ribbit" THEN Caption(LB27) = "." ELSE Caption(LB27) = "ribbit"
        CASE 28: IF Caption(LB28) = "ribbit" THEN Caption(LB28) = "." ELSE Caption(LB28) = "ribbit"
        CASE 29: IF Caption(LB29) = "ribbit" THEN Caption(LB29) = "." ELSE Caption(LB29) = "ribbit"
        CASE 30: IF Caption(LB30) = "ribbit" THEN Caption(LB30) = "." ELSE Caption(LB30) = "ribbit"
        CASE 31: IF Caption(LB31) = "ribbit" THEN Caption(LB31) = "." ELSE Caption(LB31) = "ribbit"
        CASE 32: IF Caption(LB32) = "ribbit" THEN Caption(LB32) = "." ELSE Caption(LB32) = "ribbit"
        CASE 33: IF Caption(LB33) = "ribbit" THEN Caption(LB33) = "." ELSE Caption(LB33) = "ribbit"
        CASE 34: IF Caption(LB34) = "ribbit" THEN Caption(LB34) = "." ELSE Caption(LB34) = "ribbit"
        CASE 35: IF Caption(LB35) = "ribbit" THEN Caption(LB35) = "." ELSE Caption(LB35) = "ribbit"
        CASE 36: IF Caption(LB36) = "ribbit" THEN Caption(LB36) = "." ELSE Caption(LB36) = "ribbit"
        CASE 37: IF Caption(LB37) = "ribbit" THEN Caption(LB37) = "." ELSE Caption(LB37) = "ribbit"
        CASE 38: IF Caption(LB38) = "ribbit" THEN Caption(LB38) = "." ELSE Caption(LB38) = "ribbit"
    END SELECT
    IF lpCnt MOD 8 = 0 THEN Control(ProgressBar1).Value = RND * 100
    IF lpCnt MOD 30 = 1 THEN Control(ToggleSwitch2).Value = INT(RND * 2) * -1
    IF lpCnt MOD 30 = 25 THEN Control(ToggleSwitch4).Value = INT(RND * 2) * -1

END SUB

SUB __UI_BeforeUnload
    'If you set __UI_UnloadSignal = False here you can
    'cancel the user's request to close.


END SUB

SUB __UI_Click (id AS LONG)
    SELECT CASE id
        CASE Frog

        CASE PictureBox5

        CASE PictureBox6

        CASE PictureBox9

        CASE PictureBox7

        CASE PictureBox2

        CASE PictureBox1

        CASE ProgressBar1

        CASE PictureBox3

        CASE PictureBox4

        CASE PictureBox8

        CASE LB

        CASE LB2

        CASE LB3

        CASE LB4

        CASE LB5

        CASE LB6

        CASE LB7

        CASE LB8

        CASE LB9

        CASE LB10

        CASE LB11

        CASE LB12

        CASE LB13

        CASE LB14

        CASE LB15

        CASE LB16

        CASE LB17

        CASE LB18

        CASE LB19

        CASE LB20

        CASE LB21

        CASE LB22

        CASE LB23

        CASE LB24

        CASE LB25

        CASE LB26

        CASE LB27

        CASE LB28

        CASE LB29

        CASE LB30

        CASE LB31

        CASE LB32

        CASE LB33

        CASE LB34

        CASE LB35

        CASE LB36

        CASE LB37

        CASE LB38

        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_MouseEnter (id AS LONG)
    SELECT CASE id
        CASE Frog

        CASE PictureBox5

        CASE PictureBox6

        CASE PictureBox9

        CASE PictureBox7

        CASE PictureBox2

        CASE PictureBox1

        CASE ProgressBar1

        CASE PictureBox3

        CASE PictureBox4

        CASE PictureBox8

        CASE LB

        CASE LB2

        CASE LB3

        CASE LB4

        CASE LB5

        CASE LB6

        CASE LB7

        CASE LB8

        CASE LB9

        CASE LB10

        CASE LB11

        CASE LB12

        CASE LB13

        CASE LB14

        CASE LB15

        CASE LB16

        CASE LB17

        CASE LB18

        CASE LB19

        CASE LB20

        CASE LB21

        CASE LB22

        CASE LB23

        CASE LB24

        CASE LB25

        CASE LB26

        CASE LB27

        CASE LB28

        CASE LB29

        CASE LB30

        CASE LB31

        CASE LB32

        CASE LB33

        CASE LB34

        CASE LB35

        CASE LB36

        CASE LB37

        CASE LB38

        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_MouseLeave (id AS LONG)
    SELECT CASE id
        CASE Frog

        CASE PictureBox5

        CASE PictureBox6

        CASE PictureBox9

        CASE PictureBox7

        CASE PictureBox2

        CASE PictureBox1

        CASE ProgressBar1

        CASE PictureBox3

        CASE PictureBox4

        CASE PictureBox8

        CASE LB

        CASE LB2

        CASE LB3

        CASE LB4

        CASE LB5

        CASE LB6

        CASE LB7

        CASE LB8

        CASE LB9

        CASE LB10

        CASE LB11

        CASE LB12

        CASE LB13

        CASE LB14

        CASE LB15

        CASE LB16

        CASE LB17

        CASE LB18

        CASE LB19

        CASE LB20

        CASE LB21

        CASE LB22

        CASE LB23

        CASE LB24

        CASE LB25

        CASE LB26

        CASE LB27

        CASE LB28

        CASE LB29

        CASE LB30

        CASE LB31

        CASE LB32

        CASE LB33

        CASE LB34

        CASE LB35

        CASE LB36

        CASE LB37

        CASE LB38

        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_FocusIn (id AS LONG)
    SELECT CASE id
        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_FocusOut (id AS LONG)
    'This event occurs right before a control loses focus.
    'To prevent a control from losing focus, set __UI_KeepFocus = True below.
    SELECT CASE id
        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_MouseDown (id AS LONG)
    SELECT CASE id
        CASE Frog

        CASE PictureBox5

        CASE PictureBox6

        CASE PictureBox9

        CASE PictureBox7

        CASE PictureBox2

        CASE PictureBox1

        CASE ProgressBar1

        CASE PictureBox3

        CASE PictureBox4

        CASE PictureBox8

        CASE LB

        CASE LB2

        CASE LB3

        CASE LB4

        CASE LB5

        CASE LB6

        CASE LB7

        CASE LB8

        CASE LB9

        CASE LB10

        CASE LB11

        CASE LB12

        CASE LB13

        CASE LB14

        CASE LB15

        CASE LB16

        CASE LB17

        CASE LB18

        CASE LB19

        CASE LB20

        CASE LB21

        CASE LB22

        CASE LB23

        CASE LB24

        CASE LB25

        CASE LB26

        CASE LB27

        CASE LB28

        CASE LB29

        CASE LB30

        CASE LB31

        CASE LB32

        CASE LB33

        CASE LB34

        CASE LB35

        CASE LB36

        CASE LB37

        CASE LB38

        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_MouseUp (id AS LONG)
    SELECT CASE id
        CASE Frog

        CASE PictureBox5

        CASE PictureBox6

        CASE PictureBox9

        CASE PictureBox7

        CASE PictureBox2

        CASE PictureBox1

        CASE ProgressBar1

        CASE PictureBox3

        CASE PictureBox4

        CASE PictureBox8

        CASE LB

        CASE LB2

        CASE LB3

        CASE LB4

        CASE LB5

        CASE LB6

        CASE LB7

        CASE LB8

        CASE LB9

        CASE LB10

        CASE LB11

        CASE LB12

        CASE LB13

        CASE LB14

        CASE LB15

        CASE LB16

        CASE LB17

        CASE LB18

        CASE LB19

        CASE LB20

        CASE LB21

        CASE LB22

        CASE LB23

        CASE LB24

        CASE LB25

        CASE LB26

        CASE LB27

        CASE LB28

        CASE LB29

        CASE LB30

        CASE LB31

        CASE LB32

        CASE LB33

        CASE LB34

        CASE LB35

        CASE LB36

        CASE LB37

        CASE LB38

        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_KeyPress (id AS LONG)
    'When this event is fired, __UI_KeyHit will contain the code of the key hit.
    'You can change it and even cancel it by making it = 0
    SELECT CASE id
        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_TextChanged (id AS LONG)
    SELECT CASE id
    END SELECT
END SUB

SUB __UI_ValueChanged (id AS LONG)
    SELECT CASE id
        CASE ToggleSwitch2

        CASE ToggleSwitch4

    END SELECT
END SUB

SUB __UI_FormResized

END SUB

« Last Edit: June 11, 2018, 02:55:56 PM by bplus »
B = B + ...

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #8 on: June 11, 2018, 03:27:50 PM »
Oooooh, that's adorable!

For even more cuteness, try replacing the last two lines in the BeforeUpdateDisplay event to:

Code: [Select]
    IF lpCnt MOD 30 = 1 THEN Control(ToggleSwitch2).Value = INT(RND * 2) * -1: Control(ToggleSwitch2).LastChange = TIMER
    IF lpCnt MOD 30 = 25 THEN Control(ToggleSwitch4).Value = INT(RND * 2) * -1: Control(ToggleSwitch4).LastChange = TIMER

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #9 on: June 11, 2018, 03:33:55 PM »
Yeah :)
B = B + ...

Offline Ashish

  • The joy of coding is endless.
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #10 on: June 12, 2018, 12:57:58 AM »
This is nice & funny piece of code with InForm. 😁
if (Me.success) {Me.improve()} else {Me.tryAgain()}


aKFrameWork - http://bit.ly/aKFrameWork
Menu System - http://bit.ly/guiMenuBar
p5.js in QB64 - http://bit.ly/p5jsbas

@KingOfCoders

Offline bplus

  • B = B + geberation
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #11 on: June 12, 2018, 11:45:52 AM »
Hey Ashish, maybe you have an idea to add something?

BTW, I was impressed I could build this on my desktop instead of a dedicated project folder. There was no InForm subFolder or other supplemental files in site of the Desktop, so I guess .bas ,frm projects could be built anywhere (that Windows let's you work). I now have my system recognizing .frm files and calling up the UiEditor.exe with just a click of the file. Time to switch .bas to QB64.exe for same convenience.
« Last Edit: June 12, 2018, 11:52:03 AM by bplus »
B = B + ...

Offline Ashish

  • The joy of coding is endless.
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #12 on: June 12, 2018, 12:46:23 PM »
Hey Ashish, maybe you have an idea to add something?
Currently, I've no idea in my mind to add in this. Its already looking cool!
if (Me.success) {Me.improve()} else {Me.tryAgain()}


aKFrameWork - http://bit.ly/aKFrameWork
Menu System - http://bit.ly/guiMenuBar
p5.js in QB64 - http://bit.ly/p5jsbas

@KingOfCoders

Online FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #13 on: June 12, 2018, 01:16:54 PM »
Provided you unpacked the InForm package as instructed in www.qb64.org/inform/download, that is, in the same folder as qb64.exe, then you're good to go, as QB64 starts looking for included files in its root folder. I too have .frm files associated with UiEditor.exe so that I can just double-click them to edit.