本帖最后由 xiehuahere 于 2012-8-22 18:06 编辑
回复 3# tcpuuu
$hGUI = GUICreate("EXCEL", 600, 100, -1, -1)
local $EO=6,$KU=2,$KI=56,$KO=17
local $SL[10]
For $i = 0 To 9
$SL[$i] = GUICtrlCreateLabel("",$EO,$KU,$KI,$KO,0x01)
$EO+=57
GUICtrlSetBkColor($SL[$i],0xFFFFFF)
Next
;=============================================================================
GUISetState(@SW_SHOW)
Local $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
EndSwitch
Local $info = GUIGetCursorInfo()
Local $ctrlId = $info[4], $isOnCtrl = False
;ConsoleWrite($ctrlId & @CRLF)
For $i = 0 To 9
If $ctrlId = $SL[$i] Then
$isOnCtrl = True
ToolTip("我是SL[" & $i & "]")
ExitLoop
EndIf
Next
If Not $isOnCtrl Then ToolTip("")
WEnd
|