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

0 Members and 1 Guest are viewing this topic.

FellippeHeitor

  • Guest
Just for fun: An example of what InForm is *NOT* for
« on: June 11, 2018, 12:54:28 am »
Form files should have the .frm extension.

Code: QB64: [Select]
  1. ': This form was generated by
  2. ': InForm - GUI library for QB64 - Beta version 8
  3. ': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
  4. ': https://github.com/FellippeHeitor/InForm
  5. '-----------------------------------------------------------
  6. SUB __UI_LoadForm
  7.  
  8.     DIM __UI_NewID AS LONG
  9.  
  10.     __UI_NewID = __UI_NewControl(__UI_Type_Form, "Frog", 605, 300, 0, 0, 0)
  11.     SetCaption __UI_NewID, "Frog"
  12.     Control(__UI_NewID).Stretch = False
  13.     Control(__UI_NewID).Font = SetFont("arial.ttf", 12)
  14.  
  15.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox5", 608, 150, 0, 0, 0)
  16.     Control(__UI_NewID).Stretch = True
  17.     Control(__UI_NewID).BackColor = _RGB32(0, 0, 96)
  18.     Control(__UI_NewID).Align = __UI_Center
  19.     Control(__UI_NewID).VAlign = __UI_Middle
  20.  
  21.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox6", 606, 150, 0, 150, 0)
  22.     Control(__UI_NewID).Stretch = True
  23.     Control(__UI_NewID).BackColor = _RGB32(0, 0, 139)
  24.     Control(__UI_NewID).Align = __UI_Center
  25.     Control(__UI_NewID).VAlign = __UI_Middle
  26.  
  27.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox9", 66, 150, 481, 150, 0)
  28.     Control(__UI_NewID).Stretch = True
  29.     Control(__UI_NewID).BackColor = _RGB32(132, 131, 131)
  30.     Control(__UI_NewID).Align = __UI_Center
  31.     Control(__UI_NewID).VAlign = __UI_Middle
  32.  
  33.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox7", 264, 50, 15, 211, 0)
  34.     Control(__UI_NewID).Stretch = True
  35.     Control(__UI_NewID).BackColor = _RGB32(175, 129, 70)
  36.     Control(__UI_NewID).Align = __UI_Center
  37.     Control(__UI_NewID).VAlign = __UI_Middle
  38.  
  39.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox2", 186, 138, 39, 96, 0)
  40.     Control(__UI_NewID).Stretch = True
  41.     Control(__UI_NewID).BackColor = _RGB32(48, 119, 85)
  42.     Control(__UI_NewID).Align = __UI_Center
  43.     Control(__UI_NewID).VAlign = __UI_Middle
  44.  
  45.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox1", 147, 138, 104, 52, 0)
  46.     Control(__UI_NewID).Stretch = True
  47.     Control(__UI_NewID).BackColor = _RGB32(48, 141, 85)
  48.     Control(__UI_NewID).Align = __UI_Center
  49.     Control(__UI_NewID).VAlign = __UI_Middle
  50.  
  51.     __UI_NewID = __UI_NewControl(__UI_Type_ProgressBar, "ProgressBar1", 105, 23, 125, 143, 0)
  52.     SetCaption __UI_NewID, "\#"
  53.     Control(__UI_NewID).Stretch = False
  54.     Control(__UI_NewID).Value = 100
  55.     Control(__UI_NewID).Max = 100
  56.  
  57.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox3", 95, 24, 167, 224, 0)
  58.     Control(__UI_NewID).Stretch = True
  59.     Control(__UI_NewID).BackColor = _RGB32(18, 90, 36)
  60.     Control(__UI_NewID).Align = __UI_Center
  61.     Control(__UI_NewID).VAlign = __UI_Middle
  62.  
  63.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox4", 95, 24, 53, 224, 0)
  64.     Control(__UI_NewID).Stretch = True
  65.     Control(__UI_NewID).BackColor = _RGB32(18, 90, 36)
  66.     Control(__UI_NewID).Align = __UI_Center
  67.     Control(__UI_NewID).VAlign = __UI_Middle
  68.  
  69.     __UI_NewID = __UI_NewControl(__UI_Type_PictureBox, "PictureBox8", 67, 59, 481, 15, 0)
  70.     Control(__UI_NewID).Stretch = True
  71.     Control(__UI_NewID).Align = __UI_Center
  72.     Control(__UI_NewID).VAlign = __UI_Middle
  73.  
  74.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB", 34, 38, 104, 0, 0)
  75.     SetCaption __UI_NewID, "."
  76.     Control(__UI_NewID).Stretch = False
  77.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  78.     Control(__UI_NewID).BackStyle = __UI_Transparent
  79.     Control(__UI_NewID).Align = __UI_Center
  80.     Control(__UI_NewID).VAlign = __UI_Middle
  81.  
  82.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB2", 34, 38, 132,-1, 0)
  83.     SetCaption __UI_NewID, "."
  84.     Control(__UI_NewID).Stretch = False
  85.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  86.     Control(__UI_NewID).BackStyle = __UI_Transparent
  87.     Control(__UI_NewID).Align = __UI_Center
  88.     Control(__UI_NewID).VAlign = __UI_Middle
  89.  
  90.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB3", 34, 38, 170, 0, 0)
  91.     SetCaption __UI_NewID, "."
  92.     Control(__UI_NewID).Stretch = False
  93.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  94.     Control(__UI_NewID).BackStyle = __UI_Transparent
  95.     Control(__UI_NewID).Align = __UI_Center
  96.     Control(__UI_NewID).VAlign = __UI_Middle
  97.  
  98.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB4", 34, 38, 118, 14, 0)
  99.     SetCaption __UI_NewID, "."
  100.     Control(__UI_NewID).Stretch = False
  101.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  102.     Control(__UI_NewID).BackStyle = __UI_Transparent
  103.     Control(__UI_NewID).Align = __UI_Center
  104.     Control(__UI_NewID).VAlign = __UI_Middle
  105.  
  106.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB5", 34, 38, 151, 14, 0)
  107.     SetCaption __UI_NewID, "."
  108.     Control(__UI_NewID).Stretch = False
  109.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  110.     Control(__UI_NewID).BackStyle = __UI_Transparent
  111.     Control(__UI_NewID).Align = __UI_Center
  112.     Control(__UI_NewID).VAlign = __UI_Middle
  113.  
  114.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB6", 34, 38, 209, 9, 0)
  115.     SetCaption __UI_NewID, "."
  116.     Control(__UI_NewID).Stretch = False
  117.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  118.     Control(__UI_NewID).BackStyle = __UI_Transparent
  119.     Control(__UI_NewID).Align = __UI_Center
  120.     Control(__UI_NewID).VAlign = __UI_Middle
  121.  
  122.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB7", 34, 38, 224,-8, 0)
  123.     SetCaption __UI_NewID, "."
  124.     Control(__UI_NewID).Stretch = False
  125.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  126.     Control(__UI_NewID).BackStyle = __UI_Transparent
  127.     Control(__UI_NewID).Align = __UI_Center
  128.     Control(__UI_NewID).VAlign = __UI_Middle
  129.  
  130.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB8", 34, 38, 179, 21, 0)
  131.     SetCaption __UI_NewID, "."
  132.     Control(__UI_NewID).Stretch = False
  133.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  134.     Control(__UI_NewID).BackStyle = __UI_Transparent
  135.     Control(__UI_NewID).Align = __UI_Center
  136.     Control(__UI_NewID).VAlign = __UI_Middle
  137.  
  138.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB9", 34, 38, 257, 23, 0)
  139.     SetCaption __UI_NewID, "."
  140.     Control(__UI_NewID).Stretch = False
  141.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  142.     Control(__UI_NewID).BackStyle = __UI_Transparent
  143.     Control(__UI_NewID).Align = __UI_Center
  144.     Control(__UI_NewID).VAlign = __UI_Middle
  145.  
  146.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB10", 34, 38, 258, 66, 0)
  147.     SetCaption __UI_NewID, "."
  148.     Control(__UI_NewID).Stretch = False
  149.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  150.     Control(__UI_NewID).BackStyle = __UI_Transparent
  151.     Control(__UI_NewID).Align = __UI_Center
  152.     Control(__UI_NewID).VAlign = __UI_Middle
  153.  
  154.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB11", 34, 38, 266, 95, 0)
  155.     SetCaption __UI_NewID, "."
  156.     Control(__UI_NewID).Stretch = False
  157.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  158.     Control(__UI_NewID).BackStyle = __UI_Transparent
  159.     Control(__UI_NewID).Align = __UI_Center
  160.     Control(__UI_NewID).VAlign = __UI_Middle
  161.  
  162.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB12", 34, 38, 288,-4, 0)
  163.     SetCaption __UI_NewID, "."
  164.     Control(__UI_NewID).Stretch = False
  165.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  166.     Control(__UI_NewID).BackStyle = __UI_Transparent
  167.     Control(__UI_NewID).Align = __UI_Center
  168.     Control(__UI_NewID).VAlign = __UI_Middle
  169.  
  170.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB13", 34, 38, 236, 10, 0)
  171.     SetCaption __UI_NewID, "."
  172.     Control(__UI_NewID).Stretch = False
  173.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  174.     Control(__UI_NewID).BackStyle = __UI_Transparent
  175.     Control(__UI_NewID).Align = __UI_Center
  176.     Control(__UI_NewID).VAlign = __UI_Middle
  177.  
  178.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB14", 34, 38, 269, 10, 0)
  179.     SetCaption __UI_NewID, "."
  180.     Control(__UI_NewID).Stretch = False
  181.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  182.     Control(__UI_NewID).BackStyle = __UI_Transparent
  183.     Control(__UI_NewID).Align = __UI_Center
  184.     Control(__UI_NewID).VAlign = __UI_Middle
  185.  
  186.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB15", 34, 38, 327, 5, 0)
  187.     SetCaption __UI_NewID, "."
  188.     Control(__UI_NewID).Stretch = False
  189.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  190.     Control(__UI_NewID).BackStyle = __UI_Transparent
  191.     Control(__UI_NewID).Align = __UI_Center
  192.     Control(__UI_NewID).VAlign = __UI_Middle
  193.  
  194.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB16", 34, 38, 342,-12, 0)
  195.     SetCaption __UI_NewID, "."
  196.     Control(__UI_NewID).Stretch = False
  197.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  198.     Control(__UI_NewID).BackStyle = __UI_Transparent
  199.     Control(__UI_NewID).Align = __UI_Center
  200.     Control(__UI_NewID).VAlign = __UI_Middle
  201.  
  202.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB17", 34, 38, 297, 17, 0)
  203.     SetCaption __UI_NewID, "."
  204.     Control(__UI_NewID).Stretch = False
  205.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  206.     Control(__UI_NewID).BackStyle = __UI_Transparent
  207.     Control(__UI_NewID).Align = __UI_Center
  208.     Control(__UI_NewID).VAlign = __UI_Middle
  209.  
  210.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB18", 34, 38, 375, 19, 0)
  211.     SetCaption __UI_NewID, "."
  212.     Control(__UI_NewID).Stretch = False
  213.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  214.     Control(__UI_NewID).BackStyle = __UI_Transparent
  215.     Control(__UI_NewID).Align = __UI_Center
  216.     Control(__UI_NewID).VAlign = __UI_Middle
  217.  
  218.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB19", 34, 38, 376, 62, 0)
  219.     SetCaption __UI_NewID, "."
  220.     Control(__UI_NewID).Stretch = False
  221.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  222.     Control(__UI_NewID).BackStyle = __UI_Transparent
  223.     Control(__UI_NewID).Align = __UI_Center
  224.     Control(__UI_NewID).VAlign = __UI_Middle
  225.  
  226.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB20", 34, 38, 384, 91, 0)
  227.     SetCaption __UI_NewID, "."
  228.     Control(__UI_NewID).Stretch = False
  229.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  230.     Control(__UI_NewID).BackStyle = __UI_Transparent
  231.     Control(__UI_NewID).Align = __UI_Center
  232.     Control(__UI_NewID).VAlign = __UI_Middle
  233.  
  234.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB21", 34, 38, 474,-8, 0)
  235.     SetCaption __UI_NewID, "."
  236.     Control(__UI_NewID).Stretch = False
  237.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  238.     Control(__UI_NewID).BackStyle = __UI_Transparent
  239.     Control(__UI_NewID).Align = __UI_Center
  240.     Control(__UI_NewID).VAlign = __UI_Middle
  241.  
  242.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB22", 34, 38, 422, 6, 0)
  243.     SetCaption __UI_NewID, "."
  244.     Control(__UI_NewID).Stretch = False
  245.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  246.     Control(__UI_NewID).BackStyle = __UI_Transparent
  247.     Control(__UI_NewID).Align = __UI_Center
  248.     Control(__UI_NewID).VAlign = __UI_Middle
  249.  
  250.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB23", 34, 38, 455, 6, 0)
  251.     SetCaption __UI_NewID, "."
  252.     Control(__UI_NewID).Stretch = False
  253.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  254.     Control(__UI_NewID).BackStyle = __UI_Transparent
  255.     Control(__UI_NewID).Align = __UI_Center
  256.     Control(__UI_NewID).VAlign = __UI_Middle
  257.  
  258.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB24", 34, 38, 513, 1, 0)
  259.     SetCaption __UI_NewID, "."
  260.     Control(__UI_NewID).Stretch = False
  261.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  262.     Control(__UI_NewID).BackStyle = __UI_Transparent
  263.     Control(__UI_NewID).Align = __UI_Center
  264.     Control(__UI_NewID).VAlign = __UI_Middle
  265.  
  266.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB25", 34, 38, 528,-16, 0)
  267.     SetCaption __UI_NewID, "."
  268.     Control(__UI_NewID).Stretch = False
  269.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  270.     Control(__UI_NewID).BackStyle = __UI_Transparent
  271.     Control(__UI_NewID).Align = __UI_Center
  272.     Control(__UI_NewID).VAlign = __UI_Middle
  273.  
  274.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB26", 34, 38, 483, 13, 0)
  275.     SetCaption __UI_NewID, "."
  276.     Control(__UI_NewID).Stretch = False
  277.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  278.     Control(__UI_NewID).BackStyle = __UI_Transparent
  279.     Control(__UI_NewID).Align = __UI_Center
  280.     Control(__UI_NewID).VAlign = __UI_Middle
  281.  
  282.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB27", 34, 38, 561, 15, 0)
  283.     SetCaption __UI_NewID, "."
  284.     Control(__UI_NewID).Stretch = False
  285.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  286.     Control(__UI_NewID).BackStyle = __UI_Transparent
  287.     Control(__UI_NewID).Align = __UI_Center
  288.     Control(__UI_NewID).VAlign = __UI_Middle
  289.  
  290.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB28", 34, 38, 562, 58, 0)
  291.     SetCaption __UI_NewID, "."
  292.     Control(__UI_NewID).Stretch = False
  293.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  294.     Control(__UI_NewID).BackStyle = __UI_Transparent
  295.     Control(__UI_NewID).Align = __UI_Center
  296.     Control(__UI_NewID).VAlign = __UI_Middle
  297.  
  298.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB29", 34, 38, 570, 87, 0)
  299.     SetCaption __UI_NewID, "."
  300.     Control(__UI_NewID).Stretch = False
  301.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  302.     Control(__UI_NewID).BackStyle = __UI_Transparent
  303.     Control(__UI_NewID).Align = __UI_Center
  304.     Control(__UI_NewID).VAlign = __UI_Middle
  305.  
  306.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB30", 34, 38, 343, 20, 0)
  307.     SetCaption __UI_NewID, "."
  308.     Control(__UI_NewID).Stretch = False
  309.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  310.     Control(__UI_NewID).BackStyle = __UI_Transparent
  311.     Control(__UI_NewID).Align = __UI_Center
  312.     Control(__UI_NewID).VAlign = __UI_Middle
  313.  
  314.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB31", 34, 38, 291, 34, 0)
  315.     SetCaption __UI_NewID, "."
  316.     Control(__UI_NewID).Stretch = False
  317.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  318.     Control(__UI_NewID).BackStyle = __UI_Transparent
  319.     Control(__UI_NewID).Align = __UI_Center
  320.     Control(__UI_NewID).VAlign = __UI_Middle
  321.  
  322.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB32", 34, 38, 324, 34, 0)
  323.     SetCaption __UI_NewID, "."
  324.     Control(__UI_NewID).Stretch = False
  325.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  326.     Control(__UI_NewID).BackStyle = __UI_Transparent
  327.     Control(__UI_NewID).Align = __UI_Center
  328.     Control(__UI_NewID).VAlign = __UI_Middle
  329.  
  330.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB33", 34, 38, 382, 29, 0)
  331.     SetCaption __UI_NewID, "."
  332.     Control(__UI_NewID).Stretch = False
  333.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  334.     Control(__UI_NewID).BackStyle = __UI_Transparent
  335.     Control(__UI_NewID).Align = __UI_Center
  336.     Control(__UI_NewID).VAlign = __UI_Middle
  337.  
  338.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB34", 34, 38, 397, 12, 0)
  339.     SetCaption __UI_NewID, "."
  340.     Control(__UI_NewID).Stretch = False
  341.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  342.     Control(__UI_NewID).BackStyle = __UI_Transparent
  343.     Control(__UI_NewID).Align = __UI_Center
  344.     Control(__UI_NewID).VAlign = __UI_Middle
  345.  
  346.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB35", 34, 38, 352, 41, 0)
  347.     SetCaption __UI_NewID, "."
  348.     Control(__UI_NewID).Stretch = False
  349.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  350.     Control(__UI_NewID).BackStyle = __UI_Transparent
  351.     Control(__UI_NewID).Align = __UI_Center
  352.     Control(__UI_NewID).VAlign = __UI_Middle
  353.  
  354.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB36", 34, 38, 430, 43, 0)
  355.     SetCaption __UI_NewID, "."
  356.     Control(__UI_NewID).Stretch = False
  357.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  358.     Control(__UI_NewID).BackStyle = __UI_Transparent
  359.     Control(__UI_NewID).Align = __UI_Center
  360.     Control(__UI_NewID).VAlign = __UI_Middle
  361.  
  362.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB37", 34, 38, 431, 86, 0)
  363.     SetCaption __UI_NewID, "."
  364.     Control(__UI_NewID).Stretch = False
  365.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  366.     Control(__UI_NewID).BackStyle = __UI_Transparent
  367.     Control(__UI_NewID).Align = __UI_Center
  368.     Control(__UI_NewID).VAlign = __UI_Middle
  369.  
  370.     __UI_NewID = __UI_NewControl(__UI_Type_Label, "LB38", 34, 38, 439, 115, 0)
  371.     SetCaption __UI_NewID, "."
  372.     Control(__UI_NewID).Stretch = False
  373.     Control(__UI_NewID).ForeColor = _RGB32(255, 255, 0)
  374.     Control(__UI_NewID).BackStyle = __UI_Transparent
  375.     Control(__UI_NewID).Align = __UI_Center
  376.     Control(__UI_NewID).VAlign = __UI_Middle
  377.  
  378.     __UI_NewID = __UI_NewControl(__UI_Type_ToggleSwitch, "ToggleSwitch2", 40, 17, 185, 96, 0)
  379.     Control(__UI_NewID).Stretch = False
  380.     Control(__UI_NewID).SelectedForeColor = _RGB32(0, 0, 0)
  381.     Control(__UI_NewID).SelectedBackColor = _RGB32(220, 239, 216)
  382.     Control(__UI_NewID).Value = -1
  383.     Control(__UI_NewID).CanHaveFocus = True
  384.  
  385.     __UI_NewID = __UI_NewControl(__UI_Type_ToggleSwitch, "ToggleSwitch4", 40, 17, 139, 96, 0)
  386.     Control(__UI_NewID).Stretch = False
  387.     Control(__UI_NewID).SelectedForeColor = _RGB32(0, 0, 0)
  388.     Control(__UI_NewID).SelectedBackColor = _RGB32(220, 239, 216)
  389.     Control(__UI_NewID).Value = -1
  390.     Control(__UI_NewID).CanHaveFocus = True
  391.  
  392.  
  393. SUB __UI_AssignIDs
  394.     Frog = __UI_GetID("Frog")
  395.     PictureBox5 = __UI_GetID("PictureBox5")
  396.     PictureBox6 = __UI_GetID("PictureBox6")
  397.     PictureBox9 = __UI_GetID("PictureBox9")
  398.     PictureBox7 = __UI_GetID("PictureBox7")
  399.     PictureBox2 = __UI_GetID("PictureBox2")
  400.     PictureBox1 = __UI_GetID("PictureBox1")
  401.     ProgressBar1 = __UI_GetID("ProgressBar1")
  402.     PictureBox3 = __UI_GetID("PictureBox3")
  403.     PictureBox4 = __UI_GetID("PictureBox4")
  404.     PictureBox8 = __UI_GetID("PictureBox8")
  405.     LB = __UI_GetID("LB")
  406.     LB2 = __UI_GetID("LB2")
  407.     LB3 = __UI_GetID("LB3")
  408.     LB4 = __UI_GetID("LB4")
  409.     LB5 = __UI_GetID("LB5")
  410.     LB6 = __UI_GetID("LB6")
  411.     LB7 = __UI_GetID("LB7")
  412.     LB8 = __UI_GetID("LB8")
  413.     LB9 = __UI_GetID("LB9")
  414.     LB10 = __UI_GetID("LB10")
  415.     LB11 = __UI_GetID("LB11")
  416.     LB12 = __UI_GetID("LB12")
  417.     LB13 = __UI_GetID("LB13")
  418.     LB14 = __UI_GetID("LB14")
  419.     LB15 = __UI_GetID("LB15")
  420.     LB16 = __UI_GetID("LB16")
  421.     LB17 = __UI_GetID("LB17")
  422.     LB18 = __UI_GetID("LB18")
  423.     LB19 = __UI_GetID("LB19")
  424.     LB20 = __UI_GetID("LB20")
  425.     LB21 = __UI_GetID("LB21")
  426.     LB22 = __UI_GetID("LB22")
  427.     LB23 = __UI_GetID("LB23")
  428.     LB24 = __UI_GetID("LB24")
  429.     LB25 = __UI_GetID("LB25")
  430.     LB26 = __UI_GetID("LB26")
  431.     LB27 = __UI_GetID("LB27")
  432.     LB28 = __UI_GetID("LB28")
  433.     LB29 = __UI_GetID("LB29")
  434.     LB30 = __UI_GetID("LB30")
  435.     LB31 = __UI_GetID("LB31")
  436.     LB32 = __UI_GetID("LB32")
  437.     LB33 = __UI_GetID("LB33")
  438.     LB34 = __UI_GetID("LB34")
  439.     LB35 = __UI_GetID("LB35")
  440.     LB36 = __UI_GetID("LB36")
  441.     LB37 = __UI_GetID("LB37")
  442.     LB38 = __UI_GetID("LB38")
  443.     ToggleSwitch2 = __UI_GetID("ToggleSwitch2")
  444.     ToggleSwitch4 = __UI_GetID("ToggleSwitch4")
  445.  
« Last Edit: June 11, 2018, 12:58:57 am by FellippeHeitor »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Just for fun: An example of what InForm is *NOT* for
« Reply #1 on: June 11, 2018, 10:15:51 am »
  • Best Answer
  • Uh... what is the fun part of this? :)

    FellippeHeitor

    • Guest
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #2 on: June 11, 2018, 10:36:44 am »
  • Best Answer
  • Loading it.

    Offline bplus

    • Global Moderator
    • Forum Resident
    • Posts: 8053
    • b = b + ...
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #3 on: June 11, 2018, 10:41:40 am »
  • Best Answer
  • 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.

    FellippeHeitor

    • Guest
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #4 on: June 11, 2018, 11:07:11 am »
  • Best Answer
  • Loading into InForm, bplus. It was supposed to be a joke, but then one explains it...

    Offline bplus

    • Global Moderator
    • Forum Resident
    • Posts: 8053
    • b = b + ...
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #5 on: June 11, 2018, 12:26:13 pm »
  • Best Answer
  • 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, 12:43:01 pm by bplus »

    FellippeHeitor

    • Guest
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #6 on: June 11, 2018, 12:39:21 pm »
  • Best Answer
  • 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

    • Global Moderator
    • Forum Resident
    • Posts: 8053
    • b = b + ...
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #7 on: June 11, 2018, 01:47:52 pm »
  • Best Answer
  • "Action"
    Code: QB64: [Select]
    1. 'frog.bas add action to Fellippe's .frm
    2. ': This program uses
    3. ': InForm - GUI library for QB64 - Beta version 7
    4. ': Fellippe Heitor, 2016-2018 - fellippe@qb64.org - @fellippeheitor
    5. ': https://github.com/FellippeHeitor/InForm
    6. '-----------------------------------------------------------
    7.  
    8. ': Controls' IDs: ------------------------------------------------------------------
    9. DIM SHARED PictureBox5 AS LONG
    10. DIM SHARED PictureBox6 AS LONG
    11. DIM SHARED PictureBox9 AS LONG
    12. DIM SHARED PictureBox7 AS LONG
    13. DIM SHARED PictureBox2 AS LONG
    14. DIM SHARED PictureBox1 AS LONG
    15. DIM SHARED ProgressBar1 AS LONG
    16. DIM SHARED PictureBox3 AS LONG
    17. DIM SHARED PictureBox4 AS LONG
    18. DIM SHARED PictureBox8 AS LONG
    19. DIM SHARED ToggleSwitch2 AS LONG
    20. DIM SHARED ToggleSwitch4 AS LONG
    21. DIM SHARED lpCnt
    22. ': External modules: ---------------------------------------------------------------
    23. '$INCLUDE:'InForm\InForm.ui'
    24. '$INCLUDE:'InForm\xp.uitheme'
    25. '$INCLUDE:'Frog.frm'
    26.  
    27. ': Event procedures: ---------------------------------------------------------------
    28. SUB __UI_BeforeInit
    29.  
    30.  
    31. SUB __UI_OnLoad
    32.  
    33.  
    34. SUB __UI_BeforeUpdateDisplay
    35.     'This event occurs at approximately 30 frames per second.
    36.     'You can change the update frequency by calling SetFrameRate DesiredRate%
    37.     lpCnt = lpCnt + 1
    38.     r = INT(RND * 38) + 1
    39.     SELECT CASE r
    40.         CASE 1: IF Caption(LB) = "ribbit" THEN Caption(LB) = "." ELSE Caption(LB) = "ribbit"
    41.         CASE 2: IF Caption(LB2) = "ribbit" THEN Caption(LB2) = "." ELSE Caption(LB2) = "ribbit"
    42.         CASE 3: IF Caption(LB3) = "ribbit" THEN Caption(LB3) = "." ELSE Caption(LB3) = "ribbit"
    43.         CASE 4: IF Caption(LB4) = "ribbit" THEN Caption(LB4) = "." ELSE Caption(LB4) = "ribbit"
    44.         CASE 5: IF Caption(LB5) = "ribbit" THEN Caption(LB5) = "." ELSE Caption(LB5) = "ribbit"
    45.         CASE 6: IF Caption(LB6) = "ribbit" THEN Caption(LB6) = "." ELSE Caption(LB6) = "ribbit"
    46.         CASE 7: IF Caption(LB7) = "ribbit" THEN Caption(LB7) = "." ELSE Caption(LB7) = "ribbit"
    47.         CASE 8: IF Caption(LB8) = "ribbit" THEN Caption(LB8) = "." ELSE Caption(LB8) = "ribbit"
    48.         CASE 9: IF Caption(LB9) = "ribbit" THEN Caption(LB9) = "." ELSE Caption(LB9) = "ribbit"
    49.         CASE 10: IF Caption(LB10) = "ribbit" THEN Caption(LB10) = "." ELSE Caption(LB10) = "ribbit"
    50.         CASE 11: IF Caption(LB11) = "ribbit" THEN Caption(LB11) = "." ELSE Caption(LB11) = "ribbit"
    51.         CASE 12: IF Caption(LB12) = "ribbit" THEN Caption(LB12) = "." ELSE Caption(LB12) = "ribbit"
    52.         CASE 13: IF Caption(LB13) = "ribbit" THEN Caption(LB13) = "." ELSE Caption(LB13) = "ribbit"
    53.         CASE 14: IF Caption(LB14) = "ribbit" THEN Caption(LB14) = "." ELSE Caption(LB14) = "ribbit"
    54.         CASE 15: IF Caption(LB15) = "ribbit" THEN Caption(LB15) = "." ELSE Caption(LB15) = "ribbit"
    55.         CASE 16: IF Caption(LB16) = "ribbit" THEN Caption(LB16) = "." ELSE Caption(LB16) = "ribbit"
    56.         CASE 17: IF Caption(LB17) = "ribbit" THEN Caption(LB17) = "." ELSE Caption(LB17) = "ribbit"
    57.         CASE 18: IF Caption(LB18) = "ribbit" THEN Caption(LB18) = "." ELSE Caption(LB18) = "ribbit"
    58.         CASE 19: IF Caption(LB19) = "ribbit" THEN Caption(LB19) = "." ELSE Caption(LB19) = "ribbit"
    59.         CASE 20: IF Caption(LB20) = "ribbit" THEN Caption(LB20) = "." ELSE Caption(LB20) = "ribbit"
    60.         CASE 21: IF Caption(LB21) = "ribbit" THEN Caption(LB21) = "." ELSE Caption(LB21) = "ribbit"
    61.         CASE 22: IF Caption(LB22) = "ribbit" THEN Caption(LB22) = "." ELSE Caption(LB22) = "ribbit"
    62.         CASE 23: IF Caption(LB23) = "ribbit" THEN Caption(LB23) = "." ELSE Caption(LB23) = "ribbit"
    63.         CASE 24: IF Caption(LB24) = "ribbit" THEN Caption(LB24) = "." ELSE Caption(LB24) = "ribbit"
    64.         CASE 25: IF Caption(LB25) = "ribbit" THEN Caption(LB25) = "." ELSE Caption(LB25) = "ribbit"
    65.         CASE 26: IF Caption(LB26) = "ribbit" THEN Caption(LB26) = "." ELSE Caption(LB26) = "ribbit"
    66.         CASE 27: IF Caption(LB27) = "ribbit" THEN Caption(LB27) = "." ELSE Caption(LB27) = "ribbit"
    67.         CASE 28: IF Caption(LB28) = "ribbit" THEN Caption(LB28) = "." ELSE Caption(LB28) = "ribbit"
    68.         CASE 29: IF Caption(LB29) = "ribbit" THEN Caption(LB29) = "." ELSE Caption(LB29) = "ribbit"
    69.         CASE 30: IF Caption(LB30) = "ribbit" THEN Caption(LB30) = "." ELSE Caption(LB30) = "ribbit"
    70.         CASE 31: IF Caption(LB31) = "ribbit" THEN Caption(LB31) = "." ELSE Caption(LB31) = "ribbit"
    71.         CASE 32: IF Caption(LB32) = "ribbit" THEN Caption(LB32) = "." ELSE Caption(LB32) = "ribbit"
    72.         CASE 33: IF Caption(LB33) = "ribbit" THEN Caption(LB33) = "." ELSE Caption(LB33) = "ribbit"
    73.         CASE 34: IF Caption(LB34) = "ribbit" THEN Caption(LB34) = "." ELSE Caption(LB34) = "ribbit"
    74.         CASE 35: IF Caption(LB35) = "ribbit" THEN Caption(LB35) = "." ELSE Caption(LB35) = "ribbit"
    75.         CASE 36: IF Caption(LB36) = "ribbit" THEN Caption(LB36) = "." ELSE Caption(LB36) = "ribbit"
    76.         CASE 37: IF Caption(LB37) = "ribbit" THEN Caption(LB37) = "." ELSE Caption(LB37) = "ribbit"
    77.         CASE 38: IF Caption(LB38) = "ribbit" THEN Caption(LB38) = "." ELSE Caption(LB38) = "ribbit"
    78.     END SELECT
    79.     IF lpCnt MOD 8 = 0 THEN Control(ProgressBar1).Value = RND * 100
    80.     IF lpCnt MOD 30 = 1 THEN Control(ToggleSwitch2).Value = INT(RND * 2) * -1
    81.     IF lpCnt MOD 30 = 25 THEN Control(ToggleSwitch4).Value = INT(RND * 2) * -1
    82.  
    83.  
    84. SUB __UI_BeforeUnload
    85.     'If you set __UI_UnloadSignal = False here you can
    86.     'cancel the user's request to close.
    87.  
    88.  
    89.  
    90. SUB __UI_Click (id AS LONG)
    91.     SELECT CASE id
    92.         CASE Frog
    93.  
    94.         CASE PictureBox5
    95.  
    96.         CASE PictureBox6
    97.  
    98.         CASE PictureBox9
    99.  
    100.         CASE PictureBox7
    101.  
    102.         CASE PictureBox2
    103.  
    104.         CASE PictureBox1
    105.  
    106.         CASE ProgressBar1
    107.  
    108.         CASE PictureBox3
    109.  
    110.         CASE PictureBox4
    111.  
    112.         CASE PictureBox8
    113.  
    114.         CASE LB
    115.  
    116.         CASE LB2
    117.  
    118.         CASE LB3
    119.  
    120.         CASE LB4
    121.  
    122.         CASE LB5
    123.  
    124.         CASE LB6
    125.  
    126.         CASE LB7
    127.  
    128.         CASE LB8
    129.  
    130.         CASE LB9
    131.  
    132.         CASE LB10
    133.  
    134.         CASE LB11
    135.  
    136.         CASE LB12
    137.  
    138.         CASE LB13
    139.  
    140.         CASE LB14
    141.  
    142.         CASE LB15
    143.  
    144.         CASE LB16
    145.  
    146.         CASE LB17
    147.  
    148.         CASE LB18
    149.  
    150.         CASE LB19
    151.  
    152.         CASE LB20
    153.  
    154.         CASE LB21
    155.  
    156.         CASE LB22
    157.  
    158.         CASE LB23
    159.  
    160.         CASE LB24
    161.  
    162.         CASE LB25
    163.  
    164.         CASE LB26
    165.  
    166.         CASE LB27
    167.  
    168.         CASE LB28
    169.  
    170.         CASE LB29
    171.  
    172.         CASE LB30
    173.  
    174.         CASE LB31
    175.  
    176.         CASE LB32
    177.  
    178.         CASE LB33
    179.  
    180.         CASE LB34
    181.  
    182.         CASE LB35
    183.  
    184.         CASE LB36
    185.  
    186.         CASE LB37
    187.  
    188.         CASE LB38
    189.  
    190.         CASE ToggleSwitch2
    191.  
    192.         CASE ToggleSwitch4
    193.  
    194.     END SELECT
    195.  
    196. SUB __UI_MouseEnter (id AS LONG)
    197.     SELECT CASE id
    198.         CASE Frog
    199.  
    200.         CASE PictureBox5
    201.  
    202.         CASE PictureBox6
    203.  
    204.         CASE PictureBox9
    205.  
    206.         CASE PictureBox7
    207.  
    208.         CASE PictureBox2
    209.  
    210.         CASE PictureBox1
    211.  
    212.         CASE ProgressBar1
    213.  
    214.         CASE PictureBox3
    215.  
    216.         CASE PictureBox4
    217.  
    218.         CASE PictureBox8
    219.  
    220.         CASE LB
    221.  
    222.         CASE LB2
    223.  
    224.         CASE LB3
    225.  
    226.         CASE LB4
    227.  
    228.         CASE LB5
    229.  
    230.         CASE LB6
    231.  
    232.         CASE LB7
    233.  
    234.         CASE LB8
    235.  
    236.         CASE LB9
    237.  
    238.         CASE LB10
    239.  
    240.         CASE LB11
    241.  
    242.         CASE LB12
    243.  
    244.         CASE LB13
    245.  
    246.         CASE LB14
    247.  
    248.         CASE LB15
    249.  
    250.         CASE LB16
    251.  
    252.         CASE LB17
    253.  
    254.         CASE LB18
    255.  
    256.         CASE LB19
    257.  
    258.         CASE LB20
    259.  
    260.         CASE LB21
    261.  
    262.         CASE LB22
    263.  
    264.         CASE LB23
    265.  
    266.         CASE LB24
    267.  
    268.         CASE LB25
    269.  
    270.         CASE LB26
    271.  
    272.         CASE LB27
    273.  
    274.         CASE LB28
    275.  
    276.         CASE LB29
    277.  
    278.         CASE LB30
    279.  
    280.         CASE LB31
    281.  
    282.         CASE LB32
    283.  
    284.         CASE LB33
    285.  
    286.         CASE LB34
    287.  
    288.         CASE LB35
    289.  
    290.         CASE LB36
    291.  
    292.         CASE LB37
    293.  
    294.         CASE LB38
    295.  
    296.         CASE ToggleSwitch2
    297.  
    298.         CASE ToggleSwitch4
    299.  
    300.     END SELECT
    301.  
    302. SUB __UI_MouseLeave (id AS LONG)
    303.     SELECT CASE id
    304.         CASE Frog
    305.  
    306.         CASE PictureBox5
    307.  
    308.         CASE PictureBox6
    309.  
    310.         CASE PictureBox9
    311.  
    312.         CASE PictureBox7
    313.  
    314.         CASE PictureBox2
    315.  
    316.         CASE PictureBox1
    317.  
    318.         CASE ProgressBar1
    319.  
    320.         CASE PictureBox3
    321.  
    322.         CASE PictureBox4
    323.  
    324.         CASE PictureBox8
    325.  
    326.         CASE LB
    327.  
    328.         CASE LB2
    329.  
    330.         CASE LB3
    331.  
    332.         CASE LB4
    333.  
    334.         CASE LB5
    335.  
    336.         CASE LB6
    337.  
    338.         CASE LB7
    339.  
    340.         CASE LB8
    341.  
    342.         CASE LB9
    343.  
    344.         CASE LB10
    345.  
    346.         CASE LB11
    347.  
    348.         CASE LB12
    349.  
    350.         CASE LB13
    351.  
    352.         CASE LB14
    353.  
    354.         CASE LB15
    355.  
    356.         CASE LB16
    357.  
    358.         CASE LB17
    359.  
    360.         CASE LB18
    361.  
    362.         CASE LB19
    363.  
    364.         CASE LB20
    365.  
    366.         CASE LB21
    367.  
    368.         CASE LB22
    369.  
    370.         CASE LB23
    371.  
    372.         CASE LB24
    373.  
    374.         CASE LB25
    375.  
    376.         CASE LB26
    377.  
    378.         CASE LB27
    379.  
    380.         CASE LB28
    381.  
    382.         CASE LB29
    383.  
    384.         CASE LB30
    385.  
    386.         CASE LB31
    387.  
    388.         CASE LB32
    389.  
    390.         CASE LB33
    391.  
    392.         CASE LB34
    393.  
    394.         CASE LB35
    395.  
    396.         CASE LB36
    397.  
    398.         CASE LB37
    399.  
    400.         CASE LB38
    401.  
    402.         CASE ToggleSwitch2
    403.  
    404.         CASE ToggleSwitch4
    405.  
    406.     END SELECT
    407.  
    408. SUB __UI_FocusIn (id AS LONG)
    409.     SELECT CASE id
    410.         CASE ToggleSwitch2
    411.  
    412.         CASE ToggleSwitch4
    413.  
    414.     END SELECT
    415.  
    416. SUB __UI_FocusOut (id AS LONG)
    417.     'This event occurs right before a control loses focus.
    418.     'To prevent a control from losing focus, set __UI_KeepFocus = True below.
    419.     SELECT CASE id
    420.         CASE ToggleSwitch2
    421.  
    422.         CASE ToggleSwitch4
    423.  
    424.     END SELECT
    425.  
    426. SUB __UI_MouseDown (id AS LONG)
    427.     SELECT CASE id
    428.         CASE Frog
    429.  
    430.         CASE PictureBox5
    431.  
    432.         CASE PictureBox6
    433.  
    434.         CASE PictureBox9
    435.  
    436.         CASE PictureBox7
    437.  
    438.         CASE PictureBox2
    439.  
    440.         CASE PictureBox1
    441.  
    442.         CASE ProgressBar1
    443.  
    444.         CASE PictureBox3
    445.  
    446.         CASE PictureBox4
    447.  
    448.         CASE PictureBox8
    449.  
    450.         CASE LB
    451.  
    452.         CASE LB2
    453.  
    454.         CASE LB3
    455.  
    456.         CASE LB4
    457.  
    458.         CASE LB5
    459.  
    460.         CASE LB6
    461.  
    462.         CASE LB7
    463.  
    464.         CASE LB8
    465.  
    466.         CASE LB9
    467.  
    468.         CASE LB10
    469.  
    470.         CASE LB11
    471.  
    472.         CASE LB12
    473.  
    474.         CASE LB13
    475.  
    476.         CASE LB14
    477.  
    478.         CASE LB15
    479.  
    480.         CASE LB16
    481.  
    482.         CASE LB17
    483.  
    484.         CASE LB18
    485.  
    486.         CASE LB19
    487.  
    488.         CASE LB20
    489.  
    490.         CASE LB21
    491.  
    492.         CASE LB22
    493.  
    494.         CASE LB23
    495.  
    496.         CASE LB24
    497.  
    498.         CASE LB25
    499.  
    500.         CASE LB26
    501.  
    502.         CASE LB27
    503.  
    504.         CASE LB28
    505.  
    506.         CASE LB29
    507.  
    508.         CASE LB30
    509.  
    510.         CASE LB31
    511.  
    512.         CASE LB32
    513.  
    514.         CASE LB33
    515.  
    516.         CASE LB34
    517.  
    518.         CASE LB35
    519.  
    520.         CASE LB36
    521.  
    522.         CASE LB37
    523.  
    524.         CASE LB38
    525.  
    526.         CASE ToggleSwitch2
    527.  
    528.         CASE ToggleSwitch4
    529.  
    530.     END SELECT
    531.  
    532. SUB __UI_MouseUp (id AS LONG)
    533.     SELECT CASE id
    534.         CASE Frog
    535.  
    536.         CASE PictureBox5
    537.  
    538.         CASE PictureBox6
    539.  
    540.         CASE PictureBox9
    541.  
    542.         CASE PictureBox7
    543.  
    544.         CASE PictureBox2
    545.  
    546.         CASE PictureBox1
    547.  
    548.         CASE ProgressBar1
    549.  
    550.         CASE PictureBox3
    551.  
    552.         CASE PictureBox4
    553.  
    554.         CASE PictureBox8
    555.  
    556.         CASE LB
    557.  
    558.         CASE LB2
    559.  
    560.         CASE LB3
    561.  
    562.         CASE LB4
    563.  
    564.         CASE LB5
    565.  
    566.         CASE LB6
    567.  
    568.         CASE LB7
    569.  
    570.         CASE LB8
    571.  
    572.         CASE LB9
    573.  
    574.         CASE LB10
    575.  
    576.         CASE LB11
    577.  
    578.         CASE LB12
    579.  
    580.         CASE LB13
    581.  
    582.         CASE LB14
    583.  
    584.         CASE LB15
    585.  
    586.         CASE LB16
    587.  
    588.         CASE LB17
    589.  
    590.         CASE LB18
    591.  
    592.         CASE LB19
    593.  
    594.         CASE LB20
    595.  
    596.         CASE LB21
    597.  
    598.         CASE LB22
    599.  
    600.         CASE LB23
    601.  
    602.         CASE LB24
    603.  
    604.         CASE LB25
    605.  
    606.         CASE LB26
    607.  
    608.         CASE LB27
    609.  
    610.         CASE LB28
    611.  
    612.         CASE LB29
    613.  
    614.         CASE LB30
    615.  
    616.         CASE LB31
    617.  
    618.         CASE LB32
    619.  
    620.         CASE LB33
    621.  
    622.         CASE LB34
    623.  
    624.         CASE LB35
    625.  
    626.         CASE LB36
    627.  
    628.         CASE LB37
    629.  
    630.         CASE LB38
    631.  
    632.         CASE ToggleSwitch2
    633.  
    634.         CASE ToggleSwitch4
    635.  
    636.     END SELECT
    637.  
    638. SUB __UI_KeyPress (id AS LONG)
    639.     'When this event is fired, __UI_KeyHit will contain the code of the key hit.
    640.     'You can change it and even cancel it by making it = 0
    641.     SELECT CASE id
    642.         CASE ToggleSwitch2
    643.  
    644.         CASE ToggleSwitch4
    645.  
    646.     END SELECT
    647.  
    648. SUB __UI_TextChanged (id AS LONG)
    649.     SELECT CASE id
    650.     END SELECT
    651.  
    652. SUB __UI_ValueChanged (id AS LONG)
    653.     SELECT CASE id
    654.         CASE ToggleSwitch2
    655.  
    656.         CASE ToggleSwitch4
    657.  
    658.     END SELECT
    659.  
    660. SUB __UI_FormResized
    661.  
    662.  
    663.  
    « Last Edit: June 11, 2018, 01:55:56 pm by bplus »

    FellippeHeitor

    • Guest
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #8 on: June 11, 2018, 02:27:50 pm »
  • Best Answer
  • Oooooh, that's adorable!

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

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

    Offline bplus

    • Global Moderator
    • Forum Resident
    • Posts: 8053
    • b = b + ...
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #9 on: June 11, 2018, 02:33:55 pm »
  • Best Answer
  • Yeah :)

    Offline Ashish

    • Forum Resident
    • Posts: 630
    • Never Give Up!
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #10 on: June 11, 2018, 11:57:58 pm »
  • Best Answer
  • This is nice & funny piece of code with InForm.
    if (Me.success) {Me.improve()} else {Me.tryAgain()}


    My Projects - https://github.com/AshishKingdom?tab=repositories
    OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

    Offline bplus

    • Global Moderator
    • Forum Resident
    • Posts: 8053
    • b = b + ...
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #11 on: June 12, 2018, 10:45:52 am »
  • Best Answer
  • 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, 10:52:03 am by bplus »

    Offline Ashish

    • Forum Resident
    • Posts: 630
    • Never Give Up!
      • View Profile
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #12 on: June 12, 2018, 11:46:23 am »
  • Best Answer
  • 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()}


    My Projects - https://github.com/AshishKingdom?tab=repositories
    OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

    FellippeHeitor

    • Guest
    Re: Just for fun: An example of what InForm is *NOT* for
    « Reply #13 on: June 12, 2018, 12:16:54 pm »
  • Best Answer
  • 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.