找回密码
 加入
搜索
查看: 4475|回复: 6

[系统综合] ★★★LABEL上的文字颜色设置问题。。★★★

  [复制链接]
发表于 2010-4-11 17:21:55 | 显示全部楼层 |阅读模式
本帖最后由 zhenglei 于 2010-4-11 18:03 编辑

LABEL上的文字颜色虽然很好设置。。
但不知道那种彩色文字是如何实现的。。。。   即 LABEL上的文字由1种以上颜色 。。。
不知道这个是如何实现。。  我再网上下载到一个程序。。 是由AU3写的。。 就是以上我提到的功能。。  不知道老大们是否可以实现。。
发表于 2010-4-11 18:11:13 | 显示全部楼层
没看明白......
发表于 2010-4-11 18:30:52 | 显示全部楼层
gdi线性渐变
发表于 2010-4-11 19:45:09 | 显示全部楼层
#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

HotKeySet("{ESC}", "quit")

Opt("GUICloseOnESC", 0)


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("System Net server", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_CHILD, $WS_POPUP), $WS_EX_TOPMOST)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("黑屏肃静", @DesktopWidth / 2 - 110, @DesktopHeight / 2 - 20, 500, 500)
GUICtrlSetColor($Label1, 0xf7f957)
GUICtrlSetFont($Label1, "50", "200")
GUICtrlSetBkColor($Label1, 0x000000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibEnable("color", 500)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Func color()
        $random = Random(1, 10, 1)
        Select
                Case $random = 1
                        GUICtrlSetColor($Label1, 0xf91f19)
                Case $random = 2
                        GUICtrlSetColor($Label1, 0x4bf907)
                Case $random = 3
                        GUICtrlSetColor($Label1, 0x07cef9)
                Case $random = 4
                        GUICtrlSetColor($Label1, 0x0d07f9)
                Case $random = 5
                        GUICtrlSetColor($Label1, 0xf907e5)
                Case $random = 6
                        GUICtrlSetColor($Label1, 0xfc7d0c)
                Case $random = 7
                        GUICtrlSetColor($Label1, 0xaefe02)
                Case $random = 8
                        GUICtrlSetColor($Label1, 0xfe0296)
                Case $random = 9
                        GUICtrlSetColor($Label1, 0xb402fe)
                Case $random = 10
                        GUICtrlSetColor($Label1, 0x02fbfe)
        EndSelect

EndFunc   ;==>color

Func quit()
        Exit
EndFunc   ;==>quit
某位大虾的。。。。LOOK~
新版替换AdlibEnable为 AdlibRegister
 楼主| 发表于 2010-4-12 14:29:27 | 显示全部楼层
回复 3# netegg


    对。。就是你说的那种。。 如何实现???
发表于 2010-4-15 12:45:47 | 显示全部楼层
回复 5# zhenglei

不好意思,我对gdi不熟,你看看示例吧,原始的gdiplus中如果没有,找找gdiplusex里面的,我记得好像有
发表于 2010-4-17 11:15:29 | 显示全部楼层
这个渐变色的彩色文字不错,共享一下哦
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-20 17:22 , Processed in 0.084963 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表