vb2003制作屏保200行最好

来源:百度知道 编辑:UC知道 时间:2024/06/14 19:39:20
windows窗体的屏保

'直接复制·什么都不用
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Dim WithEvents Label1 As Label '在线添加一个label时的声明
Dim WithEvents Timer1 As Timer '在线添加一个timer的声明
Dim X1%, Y1%, X2%, Y2%, I%, k%, orignX&, orignY&, J As Boolean

Private Sub Form_Load()
Set Label1 = Me.Controls.Add("VB.Label", "Label1") '在线添加Label1控件
Set Timer1 = Me.Controls.Add("VB.Timer", "Timer1") '在线添加Timer1控件
With Me
.BorderStyle = 0
.Caption = ""
.BackColor = &H0& '窗体的背景色为黑色
.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) '窗体的填充色为随机
.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) '窗体的前景色为随机
.DrawMode = 13 '窗体输出的外观为13
.DrawWidth = 2 '窗体输出的线条宽度为2
.FillStyle = 7 '窗体的填充样式为7
.KeyPreview = True
.WindowState = 2 '窗体展开样式
.Move 0, 0, Screen.Width, Screen.Hei