Guidance
指路人
g.yi.org
software / rapidq / Examples / Devices / mouse / Drag.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE FUNCTION GetAsyncKeyState LIB "user32" ALIAS _
      "GetAsyncKeyState" (vKey AS LONG) AS INTEGER
     DECLARE SUB scanmouse
     DIM scan AS QTIMER
     scan.ontimer=scanmouse
     scan.interval=100

     CREATE Form AS QFORM
      CREATE s AS QEDIT
       text="Drag me!"
      END CREATE
     END CREATE
     Form.SHOWMODAL

     SUB scanmouse
      IF getasynckeystate(1)<>0 THEN
       screen.cursor=-12
       DIM oldx AS SHORT,oldy AS SHORT
       DIM oldleft AS SHORT,oldtop AS SHORT
       oldx=screen.MOUSEX:oldy=screen.MOUSEY
       oldleft=s.left:oldtop=s.top
       WHILE getasynckeystate(1)<>0
        s.left=oldleft+screen.MOUSEX-oldx
        s.top=oldtop+screen.MOUSEY-oldy
       WEND
       screen.cursor=0
      END IF
     END SUB
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-05-31 20:31:12