Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[AHL_L/v2] TT() - Full-blown ToolTip Library


  • Please log in to reply
197 replies to this topic
DHMH
  • Members
  • 230 posts
  • Last active: Mar 25 2012 10:34 AM
  • Joined: 17 Jul 2008
Genau der gleiche Fehler

English:
No change, it's the same error message.

TROLOLOL.

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Try clearing the cache and download again :!:

DHMH
  • Members
  • 230 posts
  • Last active: Mar 25 2012 10:34 AM
  • Joined: 17 Jul 2008
That worked, thank you ;)

hackeronte
  • Members
  • 9 posts
  • Last active: Aug 17 2013 08:47 AM
  • Joined: 04 Aug 2007
Hi, HotKeyIt ( and Happy Christmas to everybody in this forum)

First thing: Thank awfully lot for your TT!!

TT on vista 32 is OK
TT on Win7 32 is OK

I'm trying to use TT with w2k sp4++ but nothing show
How's that?

#Include, TT.ahk

TTObjct := TT("Balloon NoFade NoAnimate NoPrefix AlwaysTip Icon=1","TT ToolTip Text","TT ToolTip Title") ;create a ToolTip
Sleep, 100
TT.Show(TT ToolTip Text, 600, 300, TT ToolTip Title) ;show ToolTip at mouse coordinates
Sleep, 3000
TT.Remove() ;delete ToolTip
MsgBox ToolTip Deleted
ExitApp

Can you explain me if w2k is definitely an unsupported OS for TT ?

Thank in advance for your attention and kindly courtesy

hackeronte

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Thank you ;)

Possibly is that the error :?:
#Include, TT.ahk

TTObjct := TT("Balloon NoFade NoAnimate NoPrefix AlwaysTip Icon=1","TT ToolTip Text","TT ToolTip Title") ;create a ToolTip
Sleep, 100
TT[color=red]Objct[/color].Show(TT ToolTip Text, 600, 300, TT ToolTip Title) ;show ToolTip at mouse coordinates
Sleep, 3000
TT[color=red]Objct[/color].Remove() ;delete ToolTip
MsgBox ToolTip Deleted
ExitApp


hackeronte
  • Members
  • 9 posts
  • Last active: Aug 17 2013 08:47 AM
  • Joined: 04 Aug 2007
Thanks for your fast reply!

Unfortunately (for me) not
i've corrected it and is permanently OFF
the mouse cursor flickers as something is working in bkg, but nothing shows

#Include, TT.ahk

TT := TT("Balloon NoFade NoAnimate NoPrefix AlwaysTip Icon=1","TT ToolTip Text","TT ToolTip Title") ;create a ToolTip
Sleep, 100
TT.Show(TT ToolTip Text, 600, 300, TT ToolTip Title) ;show ToolTip at mouse coordinates
Sleep, 3000
TT.Remove() ;delete ToolTip
MsgBox ToolTip Deleted
ExitApp

as far as i know (on w2k) your BalloonTip funct/objct is the ONLY funct that allow me to change font (size, typeface, effects and so on), am i right?

i hope we'll find a solution

Thanks

hackeronte

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Possibly BallonTips are disabled on your system. Have a look here how to check.
Btw. have you got w2k professional version?

Minimum supported client Windows 2000 Professional



hackeronte
  • Members
  • 9 posts
  • Last active: Aug 17 2013 08:47 AM
  • Joined: 04 Aug 2007
hi,HotKeyIt, thanks again for your kindness

<<Possibly BallonTips are disabled on your system>>

No, my tooltips are enabled
and using the function sTooltip() all works perfectly fine
; example call
sTooltip("Tooltip with custom Colors",5,0xffff00,0x00ff00)
sTooltip(sTooltipTxt,seconds=5,bg=0xFFFFE7,fg=0x0,x=-1,y=-1) {
   ; (w) derRaphael / zLib Style released / v 0.3
   if (Seconds+0=0)
      Seconds = 5
   StartTime := EndTime := A_Now
   EnvAdd,EndTime,Seconds,Seconds
   
   fg := ((fg&255)<<16)+(((fg>>8)&255)<<8)+(fg>>16) ; rgb -> bgr
   bg := ((bg&255)<<16)+(((bg>>8)&255)<<8)+(bg>>16) ; rgb -> bgr
   
   tooltip,% (ttID:="TooltipColor " A_TickCount)
   tThWnd1:=WinExist(ttID ahk_class tooltips_class32)
   ; remove border
   ; WinSet,Style,-0x800000,ahk_id %tThWnd1%
   SendMessage, 0x413, bg,0,, ahk_id %tThWnd1%   ; 0x413 is TTM_SETTIPBKCOLOR
   SendMessage, 0x414, fg,0,, ahk_id %tThWnd1%   ; 0x414 is TTM_SETTIPTEXTCOLOR
   ; according to http://msdn.microsoft.com/en-us/library/bb760411(VS.85).aspx
   ; there is no limitation on vista for this.
   Loop,
   {
      if (EndTime=A_Now)
         Break
      else
         if (x<0) || (y<0)
            ToolTip, %sTooltipTxt%
         else
            ToolTip, %sTooltipTxt%, %x%, %y%
      sleep, 50
   }
   ToolTip
}

>>have you got w2k professional version?<<

and, yeah, i have a genuine copy of windows 2000 professional (italian)
also the Ballontip.ahk
http://www.autohotke...light=ballontip
it works perfectly.
But as i said only TT allow me to customize the font of the text inside a Ballontip so...
if you know alternative ways to modify the font you're welcome...

hackeronte, thanks

hackeronte
  • Members
  • 9 posts
  • Last active: Aug 17 2013 08:47 AM
  • Joined: 04 Aug 2007
Hi, HotKeyIt

have you any idea about how to change font type, size etc. in Ballontips -w2k pro - with or without TT ?

Thanks, hackeronte

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Try this:
ToolTip_Font(hwnd, pFont="") { ;Taken from HE_SetFont, thanks majkinetor. http://www.autohotkey.com/forum/viewtopic.php?p=124450#124450

	 static WM_SETFONT := 0x30



 ;parse font 

	 italic      := InStr(pFont, "italic")    ?  1    :  0 

	 underline   := InStr(pFont, "underline") ?  1    :  0 

	 strikeout   := InStr(pFont, "strikeout") ?  1    :  0 

	 weight      := InStr(pFont, "bold")      ? 700   : 400 



 ;height 

	 RegExMatch(pFont, "(?<=[S|s])(\d{1,2})(?=[ ,])", height) 

	 if (height = "") 

			height := 10 

	 RegRead, LogPixels, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI, LogPixels 

	 height := -DllCall("MulDiv", "int", Height, "int", LogPixels, "int", 72) 



 ;face 

	 RegExMatch(pFont, "(?<=,).+", fontFace)    

	 if (fontFace != "") 

			 fontFace := RegExReplace( fontFace, "(^\s*)|(\s*$)")      ;trim 

	 else fontFace := "MS Sans Serif" 

	If (pFont && !InStr(pFont,",") && (italic+underline+strikeout+weight)=400)

		fontFace:=pFont

	

 ;create font 

	 hFont   := DllCall("CreateFont", "int",  height, "int",  0, "int",  0, "int", 0 

											,"int",  weight,   "Uint", italic,   "Uint", underline 

											,"uint", strikeOut, "Uint", nCharSet, "Uint", 0, "Uint", 0, "Uint", 0, "Uint", 0, "str", fontFace) 



	 ret:= DllCall("SendMessage","UPTR",hwnd,"UInt",WM_SETFONT,"UPTR",hFont,"UPTR",TRUE,"UPTR")

	DllCall("CloseHandle","UPTR",hfont)

	Return ret

}


hackeronte
  • Members
  • 9 posts
  • Last active: Aug 17 2013 08:47 AM
  • Joined: 04 Aug 2007
Thanks HotKeyIt i'll try it...I think that is the same funct that you`ve used in TT code...
I'll try to use it with BalloonTip.ahk, maybe modifying a little the code for a personal use.
In case of success i'll keep you informed

Thanks again,
hackeronte

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Fixed repositioning of ToolTip correctly when calling .Show() without x+y parameters.

  • Guests
  • Last active:
  • Joined: --
Hi HotKeyIt, this is very nice. I haven't tried this since the screenshot in the other thread is of XP's and I assumed it would look like it on Windows 7 as well. But actually it displays exactly like the system traytip. I think if you have access to Windows 7, adding some screenshots in the initial post helps to attract more users.

I got three questions.
1.
temp1:=DllCall( "LoadLibrary", "Str","gdiplus","UPTR")
Does this mean that the library won't work on systems don't have gdiplus.dll such as Windows 2000? In fact I tried it on Windows 2000 and didn't show anything. sean's balloon tip library didn't work either on Windows 2000. The registroy HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced >> EnableBalloonTips doesn
t have an effect.

2. Is there a way to have a fading effect when the tray(tool)tip disappears like the system tray tip window on Windows 7?

3. How do I use the add() method?

ToolTip.Add(Control[,text,uFlags/options,parent])
- Control can be text like Button1 or hwnd of control.
- Text to be displayed.
- uFlags/options can be a value or list of strings HWND CENTER RTL SUB TRACK ABSOLUTE TRANSPARENT PARSELINKS.
- Parent can be a parent window, default is set in TT function, see above.
To enable ToolTip for Static controls like Text and Picture add 0x100 to Controls options.

I tried something like this but the control does not appear in the tooltip.
TT:=TT()
TT.SetMargin(100)
Gui, SomeGUI:Add, Picture, hwndhWndPic, %A_ScriptDir%\someimage.jpg
TT.Add(hWndPic)
TT.Show("Hello","","","AutoHotkey")


HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
1. Generally most should work on Win2000 but I have not got one so can't test.
XP is required for Links and other features that are not available in Win2000.
Read more about messages and structures and whether XP is required on msdn: ToolTip Control Reference

2. This is set in Display Properties -> Appearance -> Effects -> Use the following transition effect for menus and tooltips: [Fade Effect].
Later in code you use TT.Hide() to have the fade out effect or TT.Close() to close immediately.

3. Control associated ToolTip can have 1 Title only and different text for each control, so title has to be set separately.
TT:=TT("","","AutoHotkey") ; or use TT.Title("AutoHotkey") later
TT.SetMargin(100)
Gui, Add, Picture, hwndhWndPic gLabel, X:\pic.jpg
TT.Add(hWndPic,"Hello")
Gui,Show
Return
label:
Return


  • Guests
  • Last active:
  • Joined: --

1. Generally most should work on Win2000 but I have not got one so can't test.

I just report that traytip windows not showing up on Windows 2000 here.

TT.Hide() to have the fade out effect

This works, thanks.

3. Control associated ToolTip can have 1 Title only and different text for each control, so title has to be set separately.

The code just shows the picture in the Gui window. I meant to embed a gui control in a tooltip window. Is that possible?