zhenglei 发表于 2010-4-11 17:21:55

★★★LABEL上的文字颜色设置问题。。★★★

本帖最后由 zhenglei 于 2010-4-11 18:03 编辑

LABEL上的文字颜色虽然很好设置。。
但不知道那种彩色文字是如何实现的。。。。   即 LABEL上的文字由1种以上颜色 。。。
不知道这个是如何实现。。我再网上下载到一个程序。。 是由AU3写的。。 就是以上我提到的功能。。不知道老大们是否可以实现。。

lxz 发表于 2010-4-11 18:11:13

没看明白......

netegg 发表于 2010-4-11 18:30:52

gdi线性渐变

woeiwoei 发表于 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

zhenglei 发表于 2010-4-12 14:29:27

回复 3# netegg


    对。。就是你说的那种。。 如何实现???

netegg 发表于 2010-4-15 12:45:47

回复 5# zhenglei

不好意思,我对gdi不熟,你看看示例吧,原始的gdiplus中如果没有,找找gdiplusex里面的,我记得好像有

menfan 发表于 2010-4-17 11:15:29

这个渐变色的彩色文字不错,共享一下哦
页: [1]
查看完整版本: ★★★LABEL上的文字颜色设置问题。。★★★