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

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

  
'From: "Marco" <m.waterman@h...> Tue Sep 3, 2002  6:18 am
'keep the left mousebutton down onto the form and move it. With me the form moves.

     CONST WM_syscommand=&h112
     CONST sc_move=&hF012

     DECLARE FUNCTION ReleaseCapture LIB "user32" ALIAS "ReleaseCapture" () AS LONG
     DECLARE SUB movecontrol(Button%, X%, Y%, Shift%)
     DECLARE SUB Esc

     CREATE AForm AS QFORM
      onmousedown=movecontrol
      Center
      Height = 37
      Width = 56
      Borderstyle = 0
      CREATE Stop AS QPANEL
       COLOR = &H999999
       CAPTION = "Quit"
       OnClick = Esc
       Width = 25
       Height = 15
      END CREATE
     END CREATE
     AForm.SHOWMODAL
     SUB Esc
      AForm.CLOSE
     END SUB
     SUB movecontrol(Button%, X%, Y%, Shift%)
      releasecapture
      sendmessage(aform.handle,Wm_syscommand,sc_move,0)
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-4-26  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-09-03 20:15:30