标题:[分享]颜色渐变窗体的实现
只看楼主
ioriliao
Rank: 7Rank: 7Rank: 7
来 自:广东
等 级:贵宾
威 望:32
帖 子:2829
专家分:647
注 册:2006-11-30
结帖率:78.95%
 问题点数:0 回复次数:0 
[分享]颜色渐变窗体的实现

Option Explicit

Private Sub Form_Paint()
On Error GoTo err11
Dim lY As Long
Dim lScaleHeight As Long
Dim lScaleWidth As Long
ScaleMode = vbPixels

lScaleHeight = ScaleHeight
lScaleWidth = ScaleWidth

DrawStyle = vbInvisible
FillStyle = vbFSSolid
For lY = 0 To lScaleHeight
FillColor = RGB(0, 0, 255 - (lY * 255) \ lScaleHeight)
Line (-1, lY - 1)-(lScaleWidth, lY + 1), , B

Next lY

err11:
If Err.Number = 11 Then
Exit Sub
End If
End Sub

搜索更多相关主题的帖子: 窗体 lScaleHeight 渐变 颜色 Dim 
2007-04-03 15:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-128924-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027234 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved