Hallo leute!
Ich bin neu hier im Forum und habe noch nicht sehr viel Visual Basic Erfahrung. Könnte mir irgendjemand sagen warum der Code nicht funktioniert?
Es sollte eine PictureBox in gewissen Abständen (nach dem Klick eines Button) von einem Punkt zum anderen Punkt gehen. Und könntet ihr mir auch den ganzen korriegierten Code mir geben?
Danke im Voraus!
Ich bin neu hier im Forum und habe noch nicht sehr viel Visual Basic Erfahrung. Könnte mir irgendjemand sagen warum der Code nicht funktioniert?
VB.NET-Quellcode
- Public Class Form1Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- PictureBox1.Show()
- Button1.Hide()
- End SubPrivate Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
- PictureBox1.Show()
- Timer1.Start()
- End SubPrivate Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
- Timer1.Interval = 1
- ProgressBar1.MaximumSize = 100
- ProgressBar1.MinimumSize = 0
- ProgressBar1.Step = 1
- ProgressBar1.PerformStep()
- If ProgressBar1.Value = 1 ThenPictureBox3.Location = New Point(300, 150)
- End If
- If ProgressBar1.Value = 2 ThenPictureBox3.Location = New Point(301, 150)
- End If
- If ProgressBar1.Value = 3 ThenPictureBox3.Location = New Point(302, 150)
- End If
- If ProgressBar1.Value = 4 ThenPictureBox3.Location = New Point(303, 150)
- End If
- If ProgressBar1.Value = 5 ThenPictureBox3.Location = New Point(304, 150)
- End If
- If ProgressBar1.Value = 6 ThenPictureBox3.Location = New Point(305, 150)
- End If
- If ProgressBar1.Value = 7 ThenPictureBox3.Location = New Point(306, 150)
- End If
- If ProgressBar1.Value = 8 ThenPictureBox3.Location = New Point(307, 150)
- End If
- If ProgressBar1.Value = 9 ThenPictureBox3.Location = New Point(308, 150)
- End If
- If ProgressBar1.Value = 10 ThenPictureBox3.Location = New Point(309, 150)
- End IfEnd Sub
- End Class
Es sollte eine PictureBox in gewissen Abständen (nach dem Klick eines Button) von einem Punkt zum anderen Punkt gehen. Und könntet ihr mir auch den ganzen korriegierten Code mir geben?
Danke im Voraus!