vb子程序未定义怎么改怎么办_提示子程序或函数未定义怎么修改。。。

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

在lable1

Private Sub Form_Load()

Dim i&, k&

Dim m() As Byte

Dim prew As Long, preh As Long, pret As Long

Dim h As Long, w As Long

ScreenDC = GetWindowDC(0)

ScreenW = Screen.Width / Screen.TwipsPerPixelX

ScreenH = Screen.Height / Screen.TwipsPerPixelY

ReDim m(ScreenW / 3, ScreenH / 3)

Label1.Visible = False

Me.ScaleMode = 3

Me.Show

pret = Me.Top: prew = Me.Width: preh = Me.Height

Me.Move Me.Left, Screen.Height * 2, Screen.Width / 3, Screen.Height / 3

DoEvents

Me.AutoRedraw = True

Label1.AutoSize = True

Label1 = YourWord

Label1.Font.Size = 100

Label1.Font.Size = Label1.Font.Size * (Me.ScaleWidth / Label1.Width) * BorderScale

Label1.Font.Size = Label1.Font.Size * (Me.ScaleWidth / Label1.Width) * BorderScaleMe.FontName = Label1.FontName

Me.FontSize = Label1.FontSize

Me.ForeColor = 0

CurrentX = (Me.ScaleWidth - Label1.Width) / 2

CurrentY = (Me.ScaleHeight - Label1.Height) / 2

Print Label1

For h = 1 To ScreenH / 3

For w = 1 To ScreenW / 3

If Point(w, h) = 0 Then

m(w, h) = 1

End If

Next w

Next h

Cls

SNOW_MAX = ScreenW * ScreenH \ SnowScale

ReDim Snow&(SNOW_MAX, 1), Last&(SNOW_MAX)

Randomize

For i = 0 To SNOW_MAX

NewSnow i

Snow(i, 1) = -Rnd * ScreenH

Next

Me.Move Me.Left, pret, prew, preh

Me.WindowState = 1

On Error Resume Next

Do

For i = 0 To SNOW_MAX

SetPixel ScreenDC, Snow(i, 0), Snow(i, 1), Last(i)

Snow(i, 0) = Snow(i, 0) + Rnd * FALL_SPEED - FALL_SPEED / 2

Snow(i, 1) = Snow(i, 1) + Rnd * FALL_SPEED

If Snow(i, 0) < 0 Or Snow(i, 0) > ScreenW Or Snow(i, 1) > ScreenH Then

NewSnow i

Else

k = Last(i)

Last(i) = GetPixel(ScreenDC, Snow(i, 0), Snow(i, 1))

SetPixel ScreenDC, Snow(i, 0), Snow(i, 1), SnowColor

If m(Snow(i, 0) / 3, Snow(i, 1) / 3) Then

If Rnd < SpotSpeed Then

If Rnd < 0.5 Then Last(i) = WordColor1 Else Last(i) = WordColor2

End If

End If

End If

Next

Sleep FALL_Interval&

DoEvents

If myend Then Exit Sub

Loop

End Sub

Private Sub NewSnow(i&)

Snow(i, 0) = Rnd * ScreenW

Snow(i, 1) = 0

Last(i) = GetPixel(ScreenDC, Snow(i, 0), 0)

End Sub

Private Function ColorDec(ByVal Color1&, ByVal Color2&) As Long

Dim R1%, G1%, B1%

Dim R2%, G2%, B2%

GetRGB Color1, R1, G1, B1

GetRGB Color2, R2, G2, B2

ColorDec = Abs(R1 - R2) + Abs(G1 - G2) + Abs(B1 - B2)

End Function

Private Sub GetRGB(ByVal Color&, ByRef r%, ByRef g%, ByRef b%)

r = (Color Mod 256)

b = (Int(Color \ 65536))

g = ((Color - (b * 65536) - r) \ 256)

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

myend = True

DoEvents

DoEvents

End

End Sub

Private Sub Label1_Click()

End Sub

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值