找回密码
 加入
搜索
查看: 2233|回复: 2

如何判断鼠标拖放到GUICtrlCreateInput事件???????

[复制链接]
发表于 2009-4-14 15:57:05 | 显示全部楼层 |阅读模式
如何判断鼠标拖放到GUICtrlCreateInput事件???????
发表于 2009-4-14 18:06:23 | 显示全部楼层
帮助离的CREATINPUT的例子就是拖动事件的
[au3]#include <GUIConstants.au3>

GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES
$file = GUICtrlCreateInput ( "", 10,  5, 300, 20)
GUICtrlSetState(-1,$GUI_DROPACCEPTED)
GUICtrlCreateInput ("", 10,  35, 300, 20)        ; will not accept drag&drop files
$btn = GUICtrlCreateButton ("Ok", 40,  75, 60, 20)

GUISetState ()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
       $msg = GUIGetMsg()
       Select
           Case $msg = $btn
               exitloop
       EndSelect
Wend

MsgBox (4096, "drag drop file", GUICtrlRead($file))[/au3]
发表于 2009-11-4 06:30:35 | 显示全部楼层
$WS_EX_ACCEPTFILES

允许(用户)通过拖放让被创建的GUI窗口中的编辑框/输入控件接受文件名.该控件也必须具有 $GUI_DROPACCEPTED 状态,可由 GUICtrlSetState 函数设置. 其它控件的拖放信息可以由 @GUI_DRAGID, @GUI_DRAGFILE, @GUIDROPID返回.
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 17:26 , Processed in 0.081396 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表