rem conversion demo Form1_Show 'Default Form sub c2f_click() fahrenheit.text=celsius.text*9/5+32 end sub sub f2c_click() celsius.text=(fahrenheit.text-32)*5/9 end sub '*** Begin Generated Code *** DIM Form1 SUB Form1_Load IF NOT ISEMPTY(Form1) THEN EXIT SUB REDIM Form1(4) ADDOBJECT "TextBox", "Fahrenheit", 7, 59, 91, 26 SET Form1(1) = Fahrenheit Form1(1).Caption = "Fahrenheit" Form1(1).BackColor = vbGREEN ADDOBJECT "TextBox", "Celsius", 7, 97, 91, 26 SET Form1(2) = Celsius Form1(2).Caption = "Celsius" Form1(2).BackColor = vbGREEN ADDOBJECT "CommandButton", "F2C", 101, 59, 127, 26 SET Form1(3) = F2C Form1(3).Caption = "Convert to C" Form1(3).BackColor = vbCYAN ADDOBJECT "CommandButton", "C2F", 101, 96, 127, 26 SET Form1(4) = C2F Form1(4).Caption = "Convert to F" Form1(4).BackColor = vbCYAN END SUB 'Form1_Load SUB Form1_Show DIM i Form1_ShowMenu Output.BackColor = vbYELLOW IF ISEMPTY(Form1) THEN Form1_Load FOR i = 1 TO UBOUND(Form1) Form1(i).Show NEXT END SUB 'Form1_Show SUB Form1_Hide DIM i IF ISEMPTY(Form1) THEN Err.Raise 44000, , "Form not loaded" : EXIT SUB FOR i = 1 TO UBOUND(Form1) Form1(i).Hide NEXT END SUB 'Form1_Hide SUB Form1_ShowMenu SETMENU "TitleBar", ARRAY("Conversions") SETMENU "Conversions", ARRAY("Fahrenheit to Celsius||f2c", "Celsius to Fahrenheit||c2f") END SUB 'Form1_ShowMenu '*** End Generated Code ***