如何判断鼠标拖放到GUICtrlCreateInput事件???????
如何判断鼠标拖放到GUICtrlCreateInput事件??????? 帮助离的CREATINPUT的例子就是拖动事件的#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)) $WS_EX_ACCEPTFILES
允许(用户)通过拖放让被创建的GUI窗口中的编辑框/输入控件接受文件名.该控件也必须具有 $GUI_DROPACCEPTED 状态,可由 GUICtrlSetState 函数设置. 其它控件的拖放信息可以由 @GUI_DRAGID, @GUI_DRAGFILE, @GUIDROPID返回.
页:
[1]