$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
$INCLUDE "QARROW.BAS"
DIM Arrow1 AS QArrow
DIM Arrow2 AS QArrow
DIM Arrow3 AS QArrow
DIM Arrow4 AS QArrow
DIM Arrow5 AS QArrow
DIM Form AS QFORM
DIM Font AS QFONT
DIM StateLbl AS QLABEL
DIM Checkbox AS QCHECKBOX
SUB Check
IF Checkbox.Checked THEN
Arrow2.Enabled = True
Arrow2.Refresh
ELSE
Arrow2.Enabled = False
Arrow2.Refresh
END IF
END SUB
SUB ShowArrowState
SELECT CASE Arrow1.State
CASE asNormal
StateLbl.CAPTION = "I am Normal"
CASE asHot
StateLbl.CAPTION = "I am Hot"
CASE asDown
StateLbl.CAPTION = "I am Down"
END SELECT
END SUB
SUB NewArrowOnMouseDown
Arrow1.InheritOnMouseDown
ShowArrowState
END SUB
SUB NewArrowOnMouseUp
Arrow1.InheritOnMouseUp
ShowArrowState
SHOWMESSAGE "You Clicked the arrow"
END SUB
SUB NewArrowOnMouseMove
ShowArrowState
Arrow1.InheritOnMouseMove
END SUB
SUB FormMouseMove
ShowArrowState
END SUB
WITH Arrow1
.OnMouseDown = NewArrowOnMouseDown
.OnMouseUp = NewArrowOnMouseUp
.OnMouseMove = NewArrowOnMouseMove
.Left = 60
.Top = 60
.Orientation = aoPointW
.PARENT = Form
.Bevel=True
END WITH
WITH Arrow2
.Left = 130
.Top = 78
.Width = 15
.Height = 30
.Orientation = aoPointE
.PARENT = Form
.ArrowColorDisabled=&H6666
.Enabled=False
END WITH
WITH Arrow3
.Left = 300
.Top = 75
.Width = 30
.Height = 15
.Orientation= aoPointS
.PARENT = Form
END WITH
WITH Arrow4
.Left = 250
.Top = 75
.Width = 30
.Height = 15
.Orientation = aoPointN
.PARENT = Form
END WITH
WITH Arrow5
.Left = 180
.Top = 25
.Width = 16
.Height = 32
.ArrowColorNormal=&HFF00AA
.ArrowColorHot=&HFFAAFF
.ArrowColorDown=&HA000A0
.PARENT = Form
.Bevel=False
END WITH
Font.Name = "Arial"
Font.AddStyles (fsBold)
Font.COLOR = &HF0F0F0
Font.Size = 10
StateLbl.Font = Font
StateLbl.AutoSize = True
StateLbl.Left = 10
StateLbl.Top = 10
StateLbl.PARENT = Form
Checkbox.Left=130
Checkbox.Top=140
Checkbox.PARENT = Form
Checkbox.OnClick = Check
Checkbox.CAPTION="Enable/Disable above arrow"
Checkbox.Width=220
Checkbox.Font=Font
Form.Width = 400
Form.Height = 200
Form.Center
Form.COLOR = &H6666
Form.OnMouseMove = FormMouseMove
Form.SHOWMODAL
|