$INCLUDE "RAPIDQ.INC"
$RESOURCE RES_BMP1 AS "hex.bmp"
DECLARE SUB imageclick (Button%, X%, Y%, Shift%)
CREATE Form1 AS QFORM
COLOR = QBColor(2)
WindowState = 2
END CREATE
CREATE Image1 AS QIMAGE
Width = 142
Height = 146
Top = 100
Left = 100
BMPHandle = RES_BMP1
PARENT = Form1
onmousedown = imageclick
END CREATE
Form1.SHOWMODAL
SUB imageclick (Button%,X%, Y% , Shift%)
IF Image1.pixel(X%, Y%) = image1.pixel(image1.width/2, _
image1.height/2) THEN
form1.CAPTION = "hex clicked"
ELSE
form1.CAPTION = "not hex clicked"
END IF
END SUB
|