Sign in to follow this  
Followers 0
SkellySoul

Custom Tool Tip

2 posts in this topic

#1 ·  Posted (edited)

I was wondering what is the best way to make a custom tooltip for a GUI what I think the custom tooltip should be able to support is

icons,text,pictures,font,color,background

My method can do all this but is there a better way to do it than my code.

[edit]

also what is the command again to hide a GUI from the task bar thanks :)

#NoTrayIcon
Global $Display
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUICtrlSetOnHover_UDF.au3>
$Test = GUICreate("Form1")
$Label = GUICtrlCreateLabel("Test", 200, 200, 50, 20)
_GUICtrl_SetOnHover($Label, "_Hover_On" , "_Hover_Off")
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func _Hover_On()
    $Pos = MouseGetPos()
    $Display = GUICreate("Form1", 200 , 100 , $Pos[0] , $Pos[1] , $WS_POPUP , Default , $Test)
    GUISetBkColor(0)
    GUICtrlCreateLabel("Test", 0, 0, 50, 20)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x00FF00)
    GUISetState(@SW_SHOW)
EndFunc

Func _Hover_Off()
    GUIDelete($Display)
EndFunc

Example

Posted Image

Edited by SkellySoul

Share this post


Link to post
Share on other sites



Add $WS_EX_TOOLWINDOW to remove from taskbar.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0