$TYPECHECK ON
DEFINT MX, MY
DECLARE SUB SHOWXY
CREATE TIMEX AS QTIMER
INTERVAL=10
ONTIMER=SHOWXY
END CREATE
CREATE FORM AS QFORM
CAPTION="FORM"
CENTER
CREATE PANEL AS QPANEL
CAPTION="PANEL"
ALIGN=1
HEIGHT=40
END CREATE
CREATE EDIT AS QEDIT
TEXT="TEXTBOX"
TOP=50
LEFT=20
WIDTH=150
END CREATE
CREATE BTN AS QBUTTON
TOP=100
LEFT=50
WIDTH=75
CAPTION="BUTTON"
ONMOUSEMOVE=SHOWXY
END CREATE
CREATE STATUSBAR AS QSTATUSBAR
ADDPANELS "" ,""
END CREATE
END CREATE
SUB SHOWXY
MX=SCREEN.MOUSEX-FORM.LEFT-((FORM.WIDTH-FORM.CLIENTWIDTH)/2)
MY=SCREEN.MOUSEY-FORM.TOP-((FORM.HEIGHT-FORM.CLIENTHEIGHT))
IF MX=>0 AND MX<=FORM.CLIENTWIDTH AND _
MY=>0 AND MY<=FORM.CLIENTHEIGHT THEN
STATUSBAR.PANEL(0).CAPTION=STR$(MX) & " : " & STR$(MY)
END IF
END SUB
FORM.SHOWMODAL
|