📄 main.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Snow - Peter Chamberlin"
ClientHeight = 5025
ClientLeft = 1545
ClientTop = 2760
ClientWidth = 7380
ClipControls = 0 'False
Icon = "Main.frx":0000
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 5025
ScaleWidth = 7380
ShowInTaskbar = 0 'False
WindowState = 2 'Maximized
Begin VB.Label Label1
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Snow - Peter@Chamberlin1.freeserve.co.uk netbirdfly@sina.com"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 645
Left = 120
TabIndex = 0
Top = 120
Width = 4245
WordWrap = -1 'True
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Snow(1000, 2), Amounty As Integer
Dim oSnow As New SnowWhite, Angle As Integer
Private Sub Form_Load()
Me.Show
DoEvents
Randomize: Amounty = 325
For j = 1 To Amounty
Snow(j, 0) = Int(Rnd * Me.Width)
Snow(j, 1) = Int(Rnd * Me.Height)
Snow(j, 2) = 10 + (Rnd * 20)
Next j
Dim oldx As Integer, oldy As Integer
Do While Not (DoEvents = 0)
For LS = 1 To 10
For i = 1 To Amounty
oldx = Snow(i, 0): oldy = Snow(i, 1): Snow(i, 1) = Snow(i, 1) + Snow(i, 2)
If Snow(i, 1) > Me.Height Then
Me.Show
DoEvents
Snow(i, 1) = 0
Snow(i, 2) = 5 + (Rnd * 30)
Snow(i, 0) = Int(Rnd * Me.Width)
oldx = 0: oldy = 0
End If
Coloury = 8 * (Snow(i, 2) - 10)
Coloury = 80 + Coloury
DrawSnow oldx, oldy, QBColor(0)
DrawSnow Snow(i, 0), Snow(i, 1), RGB(Coloury, Coloury, Coloury)
Next i
Next LS
Label1.Refresh
Loop
End
End Sub
Private Sub Timer1_Timer()
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
End
End Sub
Private Sub DrawSnow(ByVal x As Integer, ByVal y As Integer, ByVal clr As Long)
Dim i As Integer, x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer
oSnow.Radius = 100
oSnow.CentreX = CInt(x)
oSnow.CentreY = CInt(y)
oSnow.CalSnow
oSnow.StartAngle = 3
For i = 0 To oSnow.Count - 2
x1 = oSnow.PointX(i)
y1 = oSnow.PointY(i)
x2 = oSnow.PointX(i + 1)
y2 = oSnow.PointY(i + 1)
If Not oSnow.IsLineBegin(i + 1) Then
Me.Line (x1, y1)-(x2, y2), clr
End If
DoEvents
Next i
End Sub
Private Sub DrawSnowTri(ByVal x As Integer, ByVal y As Integer, ByVal clr As Long)
Dim i As Integer, x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer
oSnow.Radius = 3000
oSnow.CentreX = CInt(x) - 1000
oSnow.CentreY = CInt(y) + 1000
oSnow.CalSnowTri
oSnow.StartAngle = 0
For i = 0 To oSnow.Count - 2
x1 = oSnow.PointX(i)
y1 = oSnow.PointY(i)
x2 = oSnow.PointX(i + 1)
y2 = oSnow.PointY(i + 1)
If Not oSnow.IsLineBegin(i + 1) Then
pic.Line (x1, y1)-(x2, y2), clr
End If
DoEvents
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -