computer 版 (精华区)
发信人: windoe (为中国电信做贡献), 信区: program
标 题: VB:安装软件的时候总有由蓝到黑渐变的背景,是如何实
发信站: 听涛站 (Fri Mar 10 19:09:13 2000), 转信
其实就是由上到下画渐变颜色的线,程序如下:
Private Sub DrawBackGround()
Const intBLUESTART% = 255
Const intBLUEEND% = 0
Const intBANDHEIGHT% = 2
Const intSHADOWSTART% = 8
Const intSHADOWCOLOR% = 0
Const intTEXTSTART% = 4
Const intTEXTCOLOR% = 15
Dim sngBlueCur As Single
Dim sngBlueStep As Single
Dim intFormHeight As Integer
Dim intFormWidth As Integer
Dim intY As Integer
intFormHeight = ScaleHeight
intFormWidth = ScaleWidth
sngBlueStep = intBANDHEIGHT * (intBLUEEND - intBLUESTART) / intFormHeight
sngBlueCur = intBLUESTART
For intY = 0 To intFormHeight Step intBANDHEIGHT
Line (-1, intY - 1)-(intFormWidth, intY + intBANDHEIGHT), RGB(0, 0, snggBlue
Cur), BF
sngBlueCur = sngBlueCur + sngBlueStep
Next intY
End Sub
Private Sub Form_Activate()
DrawBackGround
End Sub
--By Kammi's SuperPost General Version
--
夜中不能寐,起坐弹鸣琴。
薄帷鉴明月,清风吹我襟。
孤鸿号外野,翔鸟鸣北林。
徘徊将何见,忧思独伤心。
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:0.739毫秒