我制作了一个需要图像自动Slideshare的程序,问题是我使用'Random'变量完成了此操作,并且我想按'1、2、1、2、1、2等顺序滑动。 / p>
进行所需的任何更改。 紧急情况,谢谢。
我曾经尝试过使用For循环,但是作为一个初学者,我并不那么了解。
Public Class Form4
Private rer As New Random
Dim pos As Integer = 0
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim i As Integer = +1
PictureBox5.Image = My.Resources.ResourceManager.GetObject("boxpu" & rer.Next(i, 3))
End Sub
End Class
我希望我的自动幻灯片共享按顺序而不是随机地滑动图片。