请问谁有为图片增加下雪效果?我在网上找来找去都只有一篇CSDN上也有的“制作下雪的特技景象”,但这篇文章却实现不了在图片上下雪的效果。但很久以前我有一个代码是可以实现的,现在不见了,有的朋友请给我一个,谢谢!我的email:[email protected]再次谢谢!
请问谁有为图片增加下雪效果?我在网上找来找去都只有一篇CSDN上也有的“制作下雪的特技景象”,但这篇文章却实现不了在图片上下雪的效果。但很久以前我有一个代码是可以实现的,现在不见了,有的朋友请给我一个,谢谢!我的email:[email protected]再次谢谢!
Dim gExit As BooleanPrivate Sub Command1_Click()
Dim tmpI As Long
Dim tmpLeft As Long
Dim tmpTop As Long
Dim tmpWidth As Long
Dim tmpHeight As Long
Dim tmpMyLeft As Long
Dim tmpMyTop As Long
Dim tmpMyWidth As Long
Dim tmpMyHeight As Long
tmpLeft = Picture1.Left
tmpTop = Picture1.Top
tmpLeft = 0
tmpTop = 0
tmpWidth = Picture1.Width
tmpHeight = Picture1.Height
gExit = False
Do While True
Randomize
tmpMyWidth = Rnd * tmpWidth
tmpMyHeight = Rnd * tmpHeight
tmpMyLeft = tmpLeft + tmpMyWidth
tmpMyTop = tmpTop + tmpMyHeight
Picture1.Line (tmpMyLeft, tmpMyTop)-Step(100, 100), &HFFFFFF
If gExit Then
Exit Do
End If
For tmpI = 1 To 100000
DoEvents
Next
Picture1.Refresh
Loop
End SubPrivate Sub Command2_Click()
gExit = True
End Sub