Label1.Text = "你好"
If Label1.Top > 0 Then
Label1.Top = Label1.Top - 4
ElseIf Label1.Height < Me.Height Then
Label1.Top = Label1.Top + 4
ElseIf Label1.Top = Label1.Top + 4 Then
Label1.Top = Label1.Top - 4
End If
Dim kuang As System.Drawing.Graphics
Dim pen1 As New System.Drawing.Pen(System.Drawing.Color.Green)
Me.Refresh()
Dim n As Integer
Dim x, y
kuang = Me.CreateGraphics
For n = 1 To 10
x = (Rnd() * 330)
y = (Rnd() * 290)
kuang.DrawEllipse(pen1, x, y, 10, 10)
Next n
End Sub
我想上下反复移动 但是移到上面就移不下来了
If Label1.Top > 0 Then
Label1.Top = Label1.Top - 4
ElseIf Label1.Height < Me.Height Then
Label1.Top = Label1.Top + 4
ElseIf Label1.Top = Label1.Top + 4 Then
Label1.Top = Label1.Top - 4
End If
我想 应该是这段代码出错了
知道的帮帮我