1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 03:49:56 +00:00
InForm/examples/Calculator/Calculator.frm
2023-06-16 03:28:12 +05:30

293 lines
11 KiB
Text

': This form was generated by
': InForm - GUI library for QB64 - v1.5
': Fellippe Heitor, 2016-2023 - fellippe@qb64.org - @fellippeheitor
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------
SUB __UI_LoadForm
DIM __UI_NewID AS LONG, __UI_RegisterResult AS LONG
__UI_NewID = __UI_NewControl(__UI_Type_Form, "Calculator", 235, 265, 0, 0, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "Calculator"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 12)
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_Frame, "frmResults", 220, 51, 8, 36, 0)
__UI_RegisterResult = 0
Control(__UI_NewID).HasBorder = True
Control(__UI_NewID).Value = 3
Control(__UI_NewID).BorderSize = 1
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "mnuEdit", 36, 23, 8, 0, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "&Edit"
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_MenuBar, "mnuHelp", 41, 23, 44, 0, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "Help"
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMC", 40, 23, 8, 92, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "MC"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMR", 40, 23, 53, 92, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "MR"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMS", 40, 23, 98, 92, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "MS"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMplus", 40, 23, 143, 92, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "M+"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMminus", 40, 23, 188, 92, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "M-"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butBS", 40, 23, 8, 120, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "BS"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butCE", 40, 23, 53, 120, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "CE"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butC", 40, 23, 98, 120, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "C"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butSign", 40, 23, 143, 120, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "+/-"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butSQR", 40, 23, 188, 120, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "SQR"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but7", 40, 23, 8, 148, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "7"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but8", 40, 23, 53, 148, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "8"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but9", 40, 23, 98, 148, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "9"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butDivide", 40, 23, 143, 148, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "/"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butPercent", 40, 23, 188, 148, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "%"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but4", 40, 23, 8, 176, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "4"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but5", 40, 23, 53, 176, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "5"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but6", 40, 23, 98, 176, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "6"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butMultiply", 40, 23, 143, 176, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "*"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butReciprocate", 40, 23, 188, 176, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "1/x"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but1", 40, 23, 8, 204, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "1"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but2", 40, 23, 53, 204, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "2"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but3", 40, 23, 98, 204, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "3"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butSubtract", 40, 23, 143, 204, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "-"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "but0", 85, 23, 8, 232, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "0"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butPoint", 40, 23, 98, 232, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "."
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butAdd", 40, 23, 143, 232, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "+"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_Button, "butEqual", 40, 51, 188, 204, 0)
__UI_RegisterResult = 0
SetCaption __UI_NewID, "="
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).CanHaveFocus = True
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "mnuCopy", 124, 21, 0, 4, __UI_GetID("mnuEdit"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "Copy CTRL+C"
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "mnuPaste", 123, 21, 0, 25, __UI_GetID("mnuEdit"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "Paste CTRL+V"
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "mnuAbout", 134, 21, 0, 4, __UI_GetID("mnuHelp"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "About Calculator"
Control(__UI_NewID).HasBorder = False
__UI_NewID = __UI_NewControl(__UI_Type_Label, "lblAnswer", 195, 33, 22, 15, __UI_GetID("frmResults"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "123456789012345"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 21)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).Align = __UI_Right
Control(__UI_NewID).VAlign = __UI_Middle
__UI_NewID = __UI_NewControl(__UI_Type_Label, "lblMemory", 13, 24, 6, 27, __UI_GetID("frmResults"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "M"
Control(__UI_NewID).Font = SetFont("segoeui.ttf", 14)
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).VAlign = __UI_Middle
__UI_NewID = __UI_NewControl(__UI_Type_Label, "lblHistory", 212, 21, 4, 4, __UI_GetID("frmResults"))
__UI_RegisterResult = 0
SetCaption __UI_NewID, "89 + 89 + 32"
Control(__UI_NewID).HasBorder = False
Control(__UI_NewID).Align = __UI_Right
Control(__UI_NewID).VAlign = __UI_Middle
END SUB
SUB __UI_AssignIDs
Calculator = __UI_GetID("Calculator")
frmResults = __UI_GetID("frmResults")
mnuEdit = __UI_GetID("mnuEdit")
mnuHelp = __UI_GetID("mnuHelp")
butMC = __UI_GetID("butMC")
butMR = __UI_GetID("butMR")
butMS = __UI_GetID("butMS")
butMplus = __UI_GetID("butMplus")
butMminus = __UI_GetID("butMminus")
butBS = __UI_GetID("butBS")
butCE = __UI_GetID("butCE")
butC = __UI_GetID("butC")
butSign = __UI_GetID("butSign")
butSQR = __UI_GetID("butSQR")
but7 = __UI_GetID("but7")
but8 = __UI_GetID("but8")
but9 = __UI_GetID("but9")
butDivide = __UI_GetID("butDivide")
butPercent = __UI_GetID("butPercent")
but4 = __UI_GetID("but4")
but5 = __UI_GetID("but5")
but6 = __UI_GetID("but6")
butMultiply = __UI_GetID("butMultiply")
butReciprocate = __UI_GetID("butReciprocate")
but1 = __UI_GetID("but1")
but2 = __UI_GetID("but2")
but3 = __UI_GetID("but3")
butSubtract = __UI_GetID("butSubtract")
but0 = __UI_GetID("but0")
butPoint = __UI_GetID("butPoint")
butAdd = __UI_GetID("butAdd")
butEqual = __UI_GetID("butEqual")
mnuCopy = __UI_GetID("mnuCopy")
mnuPaste = __UI_GetID("mnuPaste")
mnuAbout = __UI_GetID("mnuAbout")
lblAnswer = __UI_GetID("lblAnswer")
lblMemory = __UI_GetID("lblMemory")
lblHistory = __UI_GetID("lblHistory")
END SUB