想让他变成灰色也行,但你使用的消息模式,所以变成灰色会很闪(本人能力有限),但本人觉得没有必要变成灰色,在没有选中文件夹时点击打开或者删除进行提示我觉得更好,以下是变成灰色的部分代码代码While 1
$Strn=GUICtrlRead(GUICtrlRead($ListView2_1))
$Strnspin=StringSplit($Strn,"|")
If $Strn="不存在" Then
GUICtrlSetState($Button2_1,$GUI_DISABLE)
GUICtrlSetState($Button2_3,$GUI_DISABLE)
Else
GUICtrlSetState($Button2_1,$gui_enable)
GUICtrlSetState($Button2_3,$gui_enable)
EndIf
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button1_1
_login()
Case $msg = $Button1_2
_reg()
Case $msg = $Button1_3
_zhaohui()
Case $msg = $Button2_1 Or $msg = $dakai_menu
_open()
Case $msg = $Button2_2
_create()
Case $msg = $Button2_3 Or $msg = $del
_del()
Case $msg = $Button2_4
_change()
Case $msg = $Button2_6 Or $msg = $rush
_sql()
EndSelect
WEnd
|