GUICtrlCreateEdit 没有全选快捷键吗?
;一个问题加一个办法#include <GUIConstantsEx.au3>
#Include <GuiEdit.au3>
HotKeySet('^!a','Selectall')
Dim $editbox = -1000
$forms = GUICreate('', 800, 600)
GUISetState(@SW_SHOW, $forms)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 800, 560)
$button1 = GUICtrlCreateButton('1', 10, 570, 20, 20)
$button2 = GUICtrlCreateButton('2', 40, 570, 20, 20)
GUISetState(@SW_SHOW, $forms)
$oIE.navigate("http://www.google.com")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
Exit
Case $button1
GUICtrlSetState($button1 , $gui_focus) ;等页面加载完,没有这一行你试试,
GUISetState(@SW_HIDE, $forms)
$forms2 = GUICreate('', 800, 600)
$editbox = GUICtrlCreateEdit('试验一下退格吧', 0, 0, 800, 600)
GUISetState(@SW_SHOW, $forms2)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case - 3
GUISetState(@SW_SHOW, $forms)
GUIDelete($forms2)
ExitLoop
EndSwitch
WEnd
EndSwitch
WEnd
Func Selectall()
If $editbox<>-1000 Then _GUICtrlEdit_SetSel($editbox, 0, _GUICtrlEdit_GetTextLen($editbox))
EndFunc 呵呵,曲线救国
灵活就是解决方法啊 我也是用的这个方法,不过这导致其它程序里面的全选快捷键没有了
页:
[1]