GUI中的鼠标提示(帮助)

2008-12-06 15:50

作者:Rajat

原文:http://www.autohotkey.com/forum/viewtopic.php?t=2891


TargetWin = Test Window

; Generated using SmartGUI Creator 3.4

Gui, Add, Button, x16 y17 w60 h30, Button
Gui, Add, Checkbox, x16 y57 w70 h30, Checkbox
Gui, Add, Edit, x116 y17 w140 h70, Edit
Gui, Show, x158 y318 h103 w269, %TargetWin%
SetTimer, Tip, 2000
Return

GuiClose:
ExitApp

Tip:
   IfWinNotActive, %TargetWin%
   {
      ToolTip
      Return
   }

   MouseGetPos,,,, ACtrl
   Tip =
  
   If ACtrl = Button1
      Tip = A Button

   If ACtrl = Button2
      Tip = A Checkbox

   If ACtrl = Edit1
      Tip = My Edit field
  
   If ACtrl <> %LastCtrl%
   {
      ToolTip, %Tip%
      LastCtrl = %ACtrl%
   }
Return

你可能感兴趣的:(button)