DECLARE FUNCTION SetWindowPos LIB "user32" ALIAS "SetWindowPos" (BYVAL hwnd AS LONG, BYVAL hWndInsertAfter AS LONG, BYVAL x AS LONG, BYVAL y AS LONG, BYVAL cx AS LONG, BYVAL cy AS LONG, BYVAL wFlags AS LONG) AS LONG
DECLARE SUB me.ku (key AS WORD)
CREATE me AS QFORM
width=50
height=15
keypreview=1
onkeyup=me.ku
borderstyle=0
COLOR = &Hffffff
CREATE Edit1 AS QLABEL
Left = 0
Top = 0
Width = 50
END CREATE
END CREATE
me.show
DO
SetWindowPos me.Handle, -1, 0, 0, 0, 0, 3
DOEVENTS
me.left=screen.MOUSEX+10
me.top=screen.MOUSEY+10
edit1.CAPTION = STR$(screen.MOUSEX)+"x"+STR$(Screen.MOUSEY)
LOOP
SUB me.ku (key AS WORD)
IF key=27 THEN application.terminate
END SUB
|