1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| Public Class Form1
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
Form2.Location = Screen.AllScreens(1).Bounds.Location + New Point(100, 100)
Form2.BackColor = Color.FromArgb(123, 123, 123)
Form2.TextBox1.BackColor = Color.Transparent
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Close()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form2.TextBox1.Text = Me.TextBox1.Text
Form2.TextBox1.Top = 300
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = TextBox2.Text
Form2.TextBox1.Top = Form2.TextBox1.Top - 1
If Form2.TextBox1.Top = 5 Then
Timer1.Stop()
Form2.TextBox1.Top = 5
Timer2.Start()
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Timer2.Interval = TextBox3.Text
Form2.TextBox1.Top = 110
Timer2.Stop()
Timer1.Start()
End Sub
End Class |
Partager