2021.10.03 BeautifulToolTip - A highly compatible, high-performance, easy to use, multi-style, customizable ToolTip

Post your working scripts, libraries and tools for AHK v1.1 and older
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

2021.10.03 BeautifulToolTip - A highly compatible, high-performance, easy to use, multi-style, customizable ToolTip

19 Feb 2021, 22:49

This is a complete rewrite of ToolTip by GDI+.

BeautifulToolTip, short as BTT.




Why do i rewrite a ToolTip? Because the following 4 problems are really annoying.

  • Blinking
Image

  • Display in the wrong place
Image

  • Text is difficult to align
Image

  • Hard to get information such as size before display



BTT is designed to completely replace ToolTip, so it is fully compatible with ToolTip's syntax and settings.

  • Show a message

Code: Select all

btt("This is BeautifulToolTip")​
  • Clear it

Code: Select all

btt()​
  • Specify x,y and WhichToolTip

Code: Select all

btt("This is BeautifulToolTip`n`nWhichToolTip = 2",500,500,2)
Sleep, 5000
btt(,,,2)
  • The CoordMode command also works with BTT

Code: Select all

CoordMode, ToolTip, Screen
btt("This is BeautifulToolTip")
Sleep, 5000
btt()



BTT has several built-in styles that are still easy to use.

  • Use the built-in styles "Style1"

Code: Select all

btt("This is BeautifulToolTip",,,, "Style1")
  • More built-in styles
Image

  • Customizing styles is also very easy, just change the template parameters!

Code: Select all

#SingleInstance Force
SetBatchLines, -1

Text=
(
使用模板可以轻松创建自己的风格。
欢迎分享,带张截图!!!

Use template to easily create your own style.
Please share your custom style and include a screenshot.
It will help a lot of people.
)

; You can put your own style in btt() function, then you can use your own style in anywhere.
; All supported parameters are listed below. All parameters can be omitted.
; Please share your custom style and include a screenshot. It will help a lot of people.
; Attention:
; Color => ARGB => Alpha Red Green Blue => 0x ff aa bb cc => 0xffaabbcc
Template :=  {Border:20                                      ; If omitted, 1 will be used. Range 0-20.
            , Rounded:30                                     ; If omitted, 3 will be used. Range 0-30.
            , Margin:30                                      ; If omitted, 5 will be used. Range 0-30.
            , TabStops:[50, 80, 100]                         ; If omitted, [50] will be used. This value must be an array.
            , BorderColor:0xffaabbcc                         ; ARGB
            , BorderColorLinearGradientStart:0xff16a085      ; ARGB
            , BorderColorLinearGradientEnd:0xfff4d03f        ; ARGB
            , BorderColorLinearGradientAngle:45              ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
            , BorderColorLinearGradientMode:1                ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
            , TextColor:0xff112233                           ; ARGB
            , TextColorLinearGradientStart:0xff00416a        ; ARGB
            , TextColorLinearGradientEnd:0xffe4e5e6          ; ARGB
            , TextColorLinearGradientAngle:90                ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
            , TextColorLinearGradientMode:1                  ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
            , BackgroundColor:0xff778899                     ; ARGB
            , BackgroundColorLinearGradientStart:0xff8DA5D3  ; ARGB
            , BackgroundColorLinearGradientEnd:0xffF4CFC9    ; ARGB
            , BackgroundColorLinearGradientAngle:135         ; Mode=8 Angle 0(L to R) 90(U to D) 180(R to L) 270(D to U)
            , BackgroundColorLinearGradientMode:1            ; Mode=4 Angle 0(L to R) 90(D to U), Range 1-8.
            , Font:"Font Name"                               ; If omitted, ToolTip's Font will be used. Can specify the font file.
            , FontSize:20                                    ; If omitted, 12 will be used.
            , FontRender:5                                   ; If omitted, 5 will be used. Range 0-5.
            , FontStyle:"Regular Bold Italic BoldItalic Underline Strikeout"}

; Same as Style7
OwnStyle1 := {Border:20
            , Rounded:30
            , Margin:30
            , BorderColor:0xffaabbcc
            , TextColor:0xff112233
            , BackgroundColorLinearGradientStart:0xffF4CFC9
            , BackgroundColorLinearGradientEnd:0xff8DA5D3
            , BackgroundColorLinearGradientAngle:0
            , BackgroundColorLinearGradientMode:8
            , FontStyle:"BoldItalic Underline"}

btt(Text,,,,OwnStyle1)
Sleep,10000
ExitApp
Image



By setting the options of BTT, effects can be easily implement.

  • Fadein

Code: Select all

for k, v in [15,35,55,75,95,115,135,155,175,195,215,235,255]
{
	btt(Text,,,,"Style7",{Transparent:v})
	Sleep, 30
}
  • Fadeout

Code: Select all

for k, v in [240,220,200,180,160,140,120,100,80,60,40,20,0]
{
	btt(Text,,,,"Style7",{Transparent:v})
	Sleep, 30
}
Image

  • Dynamic color change
Image

  • Follow the window

Code: Select all

btt(Text,800-1,600-1,,"Style1",{TargetHWND:target})
Image

  • Calculate size

Code: Select all

ret := btt("test",,,,,{JustCalculateSize:1})
MsgBox, % "width:" ret.w " high:" ret.h
Calculate size.png
Calculate size.png (2.67 KiB) Viewed 6439 times



BTT also implements

  • Multi-monitor support
  • Multi-DPI support

But i won't demonstrate them here, see the packaged examples or the instructions in the source code for yourself.



Finally, with many new features, and without the annoying problems of ToolTip.

BTT's performance still 2-1000 times faster than the ToolTip !!!!!!

  • ToolTip CPU usage
Image

  • BTT CPU usage
Image

  • Elapsed time comparison
Image



BTT has been supported and inspired by the following projects
jballi's Fnt lib
robodesign's Gdip_all lib
iPhilip's FFToolTip
just me's MDMF lib
just me's ImageButton
skan's OSDTIP



Now I think you have no more reason to use tooltip, come with BTT, and show me your own style!!! :dance: :dance: :dance:

Download
https://github.com/telppa/BeautifulToolTip/releases
Last edited by tuzi on 04 Oct 2021, 00:09, edited 24 times in total.
User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

19 Feb 2021, 23:59

Great work.....! how about a transparent tooltip, and tooltip with fade-in and fade-out effects
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

20 Feb 2021, 02:19

Xeo786 wrote:
19 Feb 2021, 23:59
Great work.....! how about a transparent tooltip, and tooltip with fade-in and fade-out effects
Style2 is a transparent style.

Based on consistency with tooltip and a performance-first design philosophy, no effects are done by default, but you can simply implement them (e.g. loop set the value of transparency).
fywlts
Posts: 3
Joined: 29 Aug 2018, 00:07

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

20 Feb 2021, 05:05

非常好。很好用。
, Style6 := {Border:0 ;【边框粗细】
, Rounded:10 ;【边角弧度】
, Margin:30 ;【文字边距】
, BorderColor:0xffaabbcc ; ARGB 【边框色】100% 透明度表示完全透明,不透明度为0,对应十六进制00
, TextColor:"0xff" 随机色() ; ARGB 【字体色】
, BackgroundColor:0x00FFFFFF ; ARGB 【背景色】
, BackgroundColorLinearGradientStart:0x00F4CFC9 ; ARGB 【渐变开始色】
, BackgroundColorLinearGradientEnd:0x008DA5D3 ; ARGB 【渐变结束色】
, BackgroundColorLinearGradientDirection:2 ; 1 = Horizontal【水平】 2 = Oblique【斜】 3 = Vertical【垂直】
, Font:"Font Name" ; If omitted, ToolTip's Font will be used.
, FontSize:16 ; 【字体大小】
, FontRender:5 ; 0-5 (推荐值为5)
, FontStyle:"Bold"}
User avatar
manehscripts
Posts: 126
Joined: 03 May 2019, 16:10

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

20 Feb 2021, 14:14

Code: Select all

>"D:\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "E:\BeautifulToolTip\example 2.ahk"    
E:\BeautifulToolTip\Lib\btt.ahk (233) : ==> This line does not contain a recognized action.
Specifically: switch, O.BGCLGD
>Exit code: 2    Time: 0.141
-----------------------------------------------------------
Stop to think, shut up to resist, and act to win!
gregster
Posts: 8921
Joined: 30 Sep 2013, 06:48

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

20 Feb 2021, 14:55

manehscripts wrote:
20 Feb 2021, 14:14

Code: Select all

>"D:\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "E:\BeautifulToolTip\example 2.ahk"    
E:\BeautifulToolTip\Lib\btt.ahk (233) : ==> This line does not contain a recognized action.
Specifically: switch, O.BGCLGD
>Exit code: 2    Time: 0.141
Your AHK version is too old for the switch statement. It was first introduced in v1.1.31 (but was still a bit buggy back then, so I would recommend the current version 1.1.33.02)
User avatar
iilabs
Posts: 296
Joined: 07 Jun 2020, 16:57

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

20 Feb 2021, 17:06

Incredible! Can you do the same for the cursor? Decentralize it! :
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

22 Feb 2021, 08:20

iilabs wrote:
20 Feb 2021, 17:06
Incredible! Can you do the same for the cursor? Decentralize it! :
like this?
Image
Last edited by tuzi on 17 Nov 2021, 03:34, edited 1 time in total.
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

22 Feb 2021, 08:20

This is very handy! Thank you for sharing, very nice work! :thumbup:
User avatar
iilabs
Posts: 296
Joined: 07 Jun 2020, 16:57

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

22 Feb 2021, 09:26

Yes that is so cool. Please share!

tuzi wrote:
22 Feb 2021, 08:20
iilabs wrote:
20 Feb 2021, 17:06
Incredible! Can you do the same for the cursor? Decentralize it! :
like this?
Image
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

22 Feb 2021, 10:03

iilabs wrote:
22 Feb 2021, 09:26
Yes that is so cool. Please share!
Download
Last edited by tuzi on 17 Nov 2021, 03:36, edited 1 time in total.
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

22 Feb 2021, 15:41

@tuzi, amazing stuff, thank you. Very nice indeed.
Regards,
burque505
User avatar
rommmcek
Posts: 1470
Joined: 15 Aug 2014, 15:18

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

25 Feb 2021, 17:30

Very nice project!
- I miss shadowing, to give the Tip an elevated appearance.
- would be useful if btt supported pictures (at half size or max 1/4 of the screen).

Here is a special benchmark script for the first Tip appearance where btt stands back and a visual one too. Possible workaround would be initializing the btt in the autoexec section (that prolongs starting time of the script, but in general it is not so disturbing).
Spoiler
[Edit]: Oh, and since btt can be big, click & drag to move the tip would be also beneficial (you know the stuff w/ PostMessage, 0xA1, 2 ;WM_NCLBUTTONDOWN!
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, multi-style, customizable ToolTip

01 Mar 2021, 03:16

rommmcek wrote:
25 Feb 2021, 17:30
Very nice project!
- I miss shadowing, to give the Tip an elevated appearance.
- would be useful if btt supported pictures (at half size or max 1/4 of the screen).

Here is a special benchmark script for the first Tip appearance where btt stands back and a visual one too. Possible workaround would be initializing the btt in the autoexec section (that prolongs starting time of the script, but in general it is not so disturbing).
Spoiler
[Edit]: Oh, and since btt can be big, click & drag to move the tip would be also beneficial (you know the stuff w/ PostMessage, 0xA1, 2 ;WM_NCLBUTTONDOWN!
Maybe shadowing will be support later.

btt will not support displaying images because adding images to the display would make it complicated to use.

But here is a very simple way to display images, you can remove all the comments yourself, the code is very short and more efficient than the gui way.

Code: Select all

; gdi+ ahk tutorial 3 written by tic (Tariq Porter)
; Requires Gdip.ahk either in your Lib folder as standard library or using #Include
;
; Tutorial to take make a gui from an existing image on disk
; For the example we will use png as it can handle transparencies. The image will also be halved in size

#SingleInstance, Force
#NoEnv
SetBatchLines, -1

; Uncomment if Gdip.ahk is not in your standard library
; 加载 GDI+ 库。
#Include, Gdip.ahk

; Start gdi+
; 初始化 GDI+ 。要用到 GDI+ 的各种功能,必须先初始化!
; 这里加个判断,检测一下初始化是否成功,失败就弹窗告知,并退出程序。
If !pToken := Gdip_Startup()
{
	MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
	ExitApp
}
; 设置程序结束时,要跳转到名为 GdipExit 的标签去运行。通常在那里执行释放资源以及关闭 GDI+ 等收尾操作。
OnExit, GdipExit

; Create a layered window (+E0x80000 : must be used for UpdateLayeredWindow to work!) that is always on top (+AlwaysOnTop), has no taskbar entry or caption
; 创建一个分层(又叫异型)的界面, +E0x80000 选项是必须的,不然等会图片贴不到这上面来。
Gui, 1: -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs

; Show the window
; 显示界面。
; 注意,这里虽然叫显示界面,但因为使用了 +E0x80000 选项,所以此刻看起来还是什么都没有的,需要等会用 GDI+ 把图片贴上才能真正显示出东西来。
Gui, 1: Show, NA

; Get a handle to this window we have created in order to update it later
; 获取界面句柄。实际上也可以通过创建界面时使用 +Hwnd 选项获得句柄,两种方法都一样的。
hwnd1 := WinExist()

; Get a bitmap from the image
; 载入等会用来做界面的图片。这里将会载入一个带透明背景的 png 图片,以便你观察异型的、中空的 GUI 是怎么做出来的。
; 在 GDI+ 中,对图片做任何处理,都要先把图片转换成 “pBitmap” 格式。
; 所以这里,我们就使用 Gdip_CreateBitmapFromFile() 函数,把图片直接转换成这种格式。
; 你可以理解为,马上我们要去美国了,你得先把人民币换成美元才能被那里的美国人接受。
pBitmap := Gdip_CreateBitmapFromFile("background.png")

; Check to ensure we actually got a bitmap from the file, in case the file was corrupt or some other error occured
; 检验一下图片加载成功与否。
If !pBitmap
{
	MsgBox, 48, File loading error!, Could not load 'background.png'
	ExitApp
}

; Get the width and height of the bitmap we have just created from the file
; This will be the dimensions that the file is
; 获取图片的宽和高。看到了吧, GDI+ 中的函数,就是要提供 “pBitmap” 给它们,它们才工作。
Width := Gdip_GetImageWidth(pBitmap), Height := Gdip_GetImageHeight(pBitmap)

; Create a gdi bitmap with width and height of what we are going to draw into it. This is the entire drawing area for everything
; We are creating this "canvas" at half the size of the actual image
; We are halving it because we want the image to show in a gui on the screen at half its dimensions
; 创建一个与设备无关的位图。什么叫与设备无关呢?
; 比如你创建一个和屏幕有关的位图,同时你的屏幕是256彩色显示的,这个位图就只能是256彩色。
; 又比如你创建一个和黑白打印机有关的位图,这个位图就只能是黑白灰色的。
; 设备相关位图 DDB(Device-Dependent-Bitmap)
; DDB 不具有自己的调色板信息,它的颜色模式必须与输出设备相一致。
; 如:在256色以下的位图中存储的像素值是系统调色板的索引,其颜色依赖于系统调色板。
; 由于 DDB 高度依赖输出设备,所以 DDB 只能存在于内存中,它要么在视频内存中,要么在系统内存中。
; 设备无关位图 DIB(Device-Independent-Bitmap)
; DIB 具有自己的调色板信息,它可以不依赖系统的调色板。
; 由于它不依赖于设备,所以通常用它来保存文件,如 .bmp 格式的文件就是 DIB 。
; 使用指定的宽高创建这个位图,之后不管你是画画也好,贴图也罢,就这么大地方给你用了。
hbm := CreateDIBSection(Width//2, Height//2)

; Get a device context compatible with the screen
; 创建一个设备环境,也就是 DC 。那什么叫 DC 呢?
; 首先,当我们想要屏幕显示出一个红色圆形图案的话,正常逻辑是直接告诉显卡,给我在 XX 坐标,显示一个 XX 大小, XX 颜色的圆出来。
; 但 Windows 不允许程序员直接访问硬件。所以当我们想要对屏幕进行操作,就得通过 Windows 提供的渠道才行。这个渠道,就是 DC 。
; 屏幕上的每一个窗口都对应一个 DC ,可以把 DC 想象成一个视频缓冲区,对这个缓冲区进行操作,会表现在这个缓冲区对应的屏幕窗口上。
; 在窗口的 DC 之外,可以建立自己的 DC ,就是说它不对应窗口,这个方法就是 CreateCompatibleDC() 。
; 这个 DC 就是一个内存缓冲区,通过这个 DC 你可以把和它兼容的窗口 DC 保存到这个 DC 中,就是说你可以通过它在不同的 DC 之间拷贝数据。
; 例如,你先在这个 DC 中建立好数据,然后再拷贝到目标窗口的 DC 中,就完成了对目标窗口的刷新。
; 最后,之所以叫设备环境,不叫屏幕环境,是因为对其它设备,比如打印机的操作,也是通过它来完成的。
; 额外的扩展,CreateCompatibleDC() 函数,创建的DC,又叫内存DC,也叫兼容DC。
; 我们在绘制界面的时候,常常会听到说什么“双缓冲技术”避免闪烁,实际上就是先把内容在内存DC中画好,再一次性拷贝到目标DC里。
; 而普通的画法,就是直接在目标DC中边显示边画,所以就会闪烁。
hdc := CreateCompatibleDC()

; Select the bitmap into the device context
; 学名上,这里叫做 “把 GDI 对象选入 DC 里” 。
; 为了方便理解呢,可以认为是 “把位图扔 DC 里”。
; 因为 DC 需要具体的东西才能显示嘛,所以得把东西扔里面去。
; 注意这个函数的特点,它把 hbm 更新了,同时它返回的值是旧的 hbm !
; 这里旧的 hbm 得存着,未来释放资源的时候需要用到。
obm := SelectObject(hdc, hbm)

; Get a pointer to the graphics of the bitmap, for use with drawing functions
; G 表示的是一张画布,之后不管我们贴图也好,画画也好,都是画到这上面。
; 如果你是刚开始接触 GDI+ ,可能还没有完全弄懂这些东西的意思,所以这里总结一下基本流程。
; 初始化 GDI+ ----> 创建位图 ----> 创建 DC ----> 把位图扔 DC 里 ----> 创建画布
; 以上就是一个开始的定式,暂时不懂也没关系,记住就行了。
G := Gdip_GraphicsFromHDC(hdc)

; We do not need SmoothingMode as we did in previous examples for drawing an image
; Instead we must set InterpolationMode. This specifies how a file will be resized (the quality of the resize)
; Interpolation mode has been set to HighQualityBicubic = 7
; 这里不需要设置之前例子中用到的抗锯齿选项,因为这是在操作图片。
; 这里需要设置图片缩放的插值模式,我们使用的是模式7,也就是二次立方高质量模式!
Gdip_SetInterpolationMode(G, 7)

; DrawImage will draw the bitmap we took from the file into the graphics of the bitmap we created
; We are wanting to draw the entire image, but at half its size
; Coordinates are therefore taken from (0,0) of the source bitmap and also into the destination bitmap
; The source height and width are specified, and also the destination width and height (half the original)
; Gdip_DrawImage(pGraphics, pBitmap, dx, dy, dw, dh, sx, sy, sw, sh, Matrix)
; d is for destination and s is for source. We will not talk about the matrix yet (this is for changing colours when drawing)
; 把 pBitmap 画到 画布上。
; 整个函数的参数分别是 Gdip_DrawImage(画布, pBitmap, 新图x, 新图y, 新图宽, 新图高, 原图x, 原图y, 原图宽, 原图高, 矩阵)
; 最后的矩阵参数是给图像改变颜色之类用的,很高级,先不管它。
; 原图x, 原图y, 原图宽, 原图高
; 代表从原图的 (x,y) 这个坐标点开始,向右获得原图宽、向下获得原图高的图片数据
; 举例:当 原图x=50,原图y=100,原图宽=原图的宽,原图高=原图的高,那么实际取得的就是原图右下角部分。
; 举例:当 原图x=0,原图y=0,原图宽=原图的宽*0.9,原图高=原图的高*0.9,那么实际取得的就是原图左上角部分。
; 当原图选择了部分大小,而新图尺寸是原图大小,则会被放大填满。
; 新图x, 新图y, 新图宽, 新图高
; 代表新图在画布上的位置和大小。
Gdip_DrawImage(G, pBitmap, 0, 0, Width//2, Height//2, 0, 0, Width, Height)

; Update the specified window we have created (hwnd1) with a handle to our bitmap (hdc), specifying the x,y,w,h we want it positioned on our screen
; So this will position our gui at (0,0) with the Width and Height specified earlier (half of the original image)
; 将 DC 上的内容显示在窗口上。此时,界面真正显示出来了。
; 注意,这里的宽高不能大于 CreateDIBSection() 时的宽高。
; 现在的层级关系是这样的,我们眼睛看到的是屏幕,屏幕是一个全透明的玻璃。
; 屏幕后面的是 DC 。而 DC 的后面,则是画布。
; 我们把 DC 想象成一张纯黑色的纸,中间掏空了部分。显然,透过黑纸掏空的部分,我们才能看到画布上的东西。
; 此处做视频的话,最好直接用两张纸做个演示模型,方便大家理解。
; 画布的坐标0点是相对 DC 的。而 DC 的坐标0点是相对屏幕的。
; 此时可以用 spy 工具观察,图片范围外是没有句柄的,也就是说,这是一个异型的界面。
UpdateLayeredWindow(hwnd1, hdc, 5, 0, Width//2, Height//2)

; The bitmap we made from the image may be deleted
; 到此整个绘画工作就结束了,因此下面开始释放资源。
; 这里依然总结一下,结束的流程跟开始的流程基本一致,也是定式。
; 删除图片 ----> 删除画布 ----> 还原位图 ----> 删除 DC ----> 删除位图 ----> 关闭 GDI+
; 删除图片。
Gdip_DisposeImage(pBitmap)

; The graphics may now be deleted
; 删除画布。
Gdip_DeleteGraphics(G)

; Select the object back into the hdc
; 还原位图。
SelectObject(hdc, obm)

; Also the device context related to the bitmap may be deleted
; 删除 DC 。
DeleteDC(hdc)

; Now the bitmap may be deleted
; 删除位图。
DeleteObject(hbm)

Return

;#######################################################################
GuiClose:
GuiEscape:
GdipExit:
	; gdi+ may now be shutdown on exiting the program
	; 别忘了,我们最开始用 Gdip_Startup() 启动了,这里对应要用 Gdip_Shutdown() 关闭它。
	Gdip_Shutdown(pToken)
	ExitApp
Return
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, easy to use, multi-style, customizable ToolTip

01 Mar 2021, 22:52

changelog:
2021.03.03
  • Support linear gradient for text color.
  • Add Style8.
  • Add 3 linear gradient directions.
2021.03.02
  • Support linear gradient for border color.
  • Add Style7.
  • Add 2 linear gradient directions.
Image
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: BeautifulToolTip - A highly compatible, high-performance, easy to use, multi-style, customizable ToolTip

08 Mar 2021, 00:17

changelog:
2021.03.07
  • Remove LinearGradientDirection parameter.
  • Add LinearGradientAngle parameter to support 360°.
  • Add LinearGradientMode parameter to support 8 modes.
Now, by changing the angle of the color gradient, a simple animation can be easy implement.
You can see it in example 7.

Image

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 125 guests