DECLARE SUB Button1Clicked
DECLARE SUB Button2Clicked
DECLARE SUB Button3Clicked
DECLARE SUB Button4Clicked
CRLF$ = CHR$(13)+CHR$(10)
TRUE = 1
FALSE = 0
DIM Form AS QFORM
Form.CAPTION = "Tron Doc's Hacks!"
Form.Width = 350
Form.Height = 60
Form.Center
ButtonTop = 0
ButtonWidth = 75
ButtonSpace = ButtonWidth + 5
DIM Button1 AS QBUTTON
Button1.NumBMPs = 3
Button1.BMP = "BMPBTTN1.BMP"
Button1.PARENT = Form
Button1.Left = 13
Button1.Top = ButtonTop
Button1.Width = ButtonWidth
Button1.CAPTION = "BMPB&1"
Button1.ShowHint = True
Button1.Hint = "Buttons #3 & #4"+CRLF$+"are disabled!"
Button1.OnClick = Button1Clicked
DIM Button2 AS QBUTTON
Button2.NumBMPs = 3
Button2.BMP = "BMPBTTN2.BMP"
Button2.PARENT = Form
Button2.Left = Button1.Left + ButtonSpace
Button2.Top = ButtonTop
Button2.Width = ButtonWidth
Button2.CAPTION = "BMPB&2"
Button2.ShowHint = True
Button2.Hint = ":)"
Button2.OnClick = Button2Clicked
DIM Button3 AS QBUTTON
Button3.NumBMPs = 3
Button3.BMP = "BMPBTTN1.BMP"
Button3.PARENT = Form
Button3.Left = Button2.Left + ButtonSpace
Button3.Top = ButtonTop
Button3.Width = ButtonWidth
Button3.Enabled = False
Button3.CAPTION = "BMPB&3"
Button3.ShowHint = True
Button3.Hint = "Button #3"+CRLF$+"is disabled!"
Button3.OnClick = Button3Clicked
DIM Button4 AS QBUTTON
Button4.NumBMPs = 3
Button4.BMP = "BMPBTTN2.BMP"
Button4.PARENT = Form
Button4.Left = Button3.Left + ButtonSpace
Button4.Top = ButtonTop
Button4.Width = ButtonWidth
Button4.Enabled = False
Button4.CAPTION = "BMPB&4"
Button4.ShowHint = True
Button4.Hint = "Button #4"+CRLF$+"is disabled!"
Button4.OnClick = Button4Clicked
SUB Button1Clicked
SHOWMESSAGE "You Clicked"+CRLF$+"Button #1"
END SUB
SUB Button2Clicked
SHOWMESSAGE "You Clicked"+CRLF$+"Button #2"
END SUB
SUB Button3Clicked
SHOWMESSAGE "You Clicked"+CRLF$+"Button #3"
END SUB
SUB Button4Clicked
SHOWMESSAGE "You Clicked"+CRLF$+"Button #4"
END SUB
Form.SHOWMODAL
|