Yashied Posted May 17, 2009 Posted May 17, 2009 How I can remove the tooltip after its activation through WM_HELP message.Thanks.#include <GUIConstantsEx.au3> #include <Misc.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $Form = GUICreate("My GUI", 400, 400, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $DS_CONTEXTHELP), $WS_EX_CONTEXTHELP) $Button = GUICtrlCreateButton("Exit", 165, 360, 70, 23) GUIRegisterMsg($WM_HELP, '_WM_HELP') GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $Button, $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_HELP($hWnd, $msgID, $wParam, $lParam) Local $tPOINT = _WinAPI_GetMousePos() Local $hHandle = _WinAPI_WindowFromPoint($tPOINT) Local $ID = _WinAPI_GetDlgCtrlID($hHandle) If _IsPressed(70) Then Switch $ID Case $Button Run('hh.exe ' & RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.chm') EndSwitch Else ToolTip('This is a tooltip', DllStructGetData($tPOINT, 1), DllStructGetData($tPOINT, 2), '', 0, 1) EndIf EndFunc ;==>_WM_HELP My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Zedna Posted May 17, 2009 Posted May 17, 2009 ToolTip("") An empty string clears a displaying tooltip Resources UDF ResourcesEx UDF AutoIt Forum Search
Yashied Posted May 17, 2009 Author Posted May 17, 2009 ToolTip("")An empty string clears a displaying tooltip I know it, but how to catch those moments when I need to remove the tooltip? I want to make sure how it works in Windows. For example, the standard Mouse Properties Dlg. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Yashied Posted May 17, 2009 Author Posted May 17, 2009 I found this. Excellent work, but Tooltip more beautiful. Any ideas. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
KaFu Posted May 17, 2009 Posted May 17, 2009 Remove it with a Timer expandcollapse popup#include <GUIConstantsEx.au3> #include <Misc.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <Timers.au3> $Form = GUICreate("My GUI", 400, 400, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $DS_CONTEXTHELP), $WS_EX_CONTEXTHELP) $Button = GUICtrlCreateButton("Exit", 165, 360, 70, 23) GUIRegisterMsg($WM_HELP, '_WM_HELP') Global $bTooltipActive = False Global $iTooltipTime _Timer_SetTimer($Form, 250, "_Remove_WM_HELP_Tooltip") GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $Button, $GUI_EVENT_CLOSE _Timer_KillAllTimers($Form) Exit EndSwitch WEnd Func _WM_HELP($hWnd, $msgID, $wParam, $lParam) Local $tPOINT = _WinAPI_GetMousePos() Local $hHandle = _WinAPI_WindowFromPoint($tPOINT) Local $ID = _WinAPI_GetDlgCtrlID($hHandle) If _IsPressed(70) Then Switch $ID Case $Button Run('hh.exe ' & RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.chm') EndSwitch Else $bTooltipActive = True $iTooltipTime = TimerInit() ToolTip('This is a tooltip', DllStructGetData($tPOINT, 1), DllStructGetData($tPOINT, 2), '', 0, 1) EndIf EndFunc ;==>_WM_HELP Func _Remove_WM_HELP_Tooltip($hWnd, $Msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime if $bTooltipActive = True Then if TimerDiff($iTooltipTime) > 1000 Then ToolTip('') $bTooltipActive = False endif endif EndFunc ;==>_Remove_WM_HELP_Tooltip OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Yashied Posted May 17, 2009 Author Posted May 17, 2009 Thanks, but this is not the best way. I try using _WinAPI_SetWindowLong(), but also disappointed. I need to process too many messages. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now