VB.NET - How To Make Image Slide Show In Visual Basic.NET
In This VB.NET Tutorial We Will See How To Create An Images SlideShow Using Images And PictureBox In Visual Basic .NET Programming Language .
Project Source Code:
Public Class VBNET_Images_SlideShow
Dim images(10) As Bitmap
Dim pos As Integer = 0
Private Sub VBNET_Images_SlideShow_Load(sender As Object, e As EventArgs) Handles MyBase.Load
images(0) = WindowsApplication1.My.Resources.product_1
images(1) = WindowsApplication1.My.Resources.product_2
images(2) = WindowsApplication1.My.Resources.product_3
images(3) = WindowsApplication1.My.Resources.product_4
images(4) = WindowsApplication1.My.Resources.product_5
images(5) = WindowsApplication1.My.Resources.product_6
images(6) = WindowsApplication1.My.Resources.product_7
images(7) = WindowsApplication1.My.Resources.product_8
images(8) = WindowsApplication1.My.Resources.product_9
images(9) = WindowsApplication1.My.Resources.product_10
PictureBox1.Image = images(pos)
End Sub
Private Sub BTN_NEXT_Click(sender As Object, e As EventArgs) Handles BTN_NEXT.Click
pos = pos + 1
If pos < images.Length - 1 Then
PictureBox1.Image = images(pos)
Else
pos = images.Length - 2
End If
End Sub
Private Sub BTN_PREVIOUS_Click(sender As Object, e As EventArgs) Handles BTN_PREVIOUS.Click
pos = pos - 1
If pos >= 0 Then
PictureBox1.Image = images(pos)
Else
pos = 0
End If
End Sub
End Class