How to Create an Image Slideshow Using VB.Net with Picturebox


Image Slideshow Using VB.Net is a presentation supplemented by or based on a series of projected images or photographic slides. On this tutorial I will show you how to create a simple slideshow of images in using button and Picturebox.


  • First is Open the visual basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK


  • After clicking OK, Design your form just like what I’ve show you below.

            Select a Picturebox in the toolbox and then a two Button. Rename the Button “Next” and “Previous” to the other button.

  • Then after designing your form. Select ImageList in the Toolbox


       After Selecting ImageList in the toolbox, Click now the Imagelist Task (The Logo in the Upper Right)



      Set the Image Size to “256,256” and the Image Bit Depth to “Depth32Bit”
      Then Click Choose images to add and remove images that you like put in the Picture Box. After that Click OK if you’re finish.


  • After you finish putting pictures, click the Next Button then write this code.
  1. Private Sub Btnnext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnnext.Click
  2. Btnprevious.Enabled = True
  3. Static i As Integer
  4. Dim incp As String
  5. incp = +1
  6. i += 1
  7. PictureBox1.Image = ImageList1.Images(i)
  8. If i = ImageList1.Images.Count - 1 Then
  9. i = -1
  10. End If
  11. End Sub
  • Then Click the Previous Button and add this code.
  1. Private Sub Btnprevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnprevious.Click
  2. Static i As Integer
  3. Dim incp As String
  4. incp = +1
  5. i += 1
  6. PictureBox1.Image = ImageList1.Images(i)
  7. If i = ImageList1.Images.Count - 1 Then
  8. i = -incp
  9. End If
  10. End Sub


  • After writing the codes, Go to Design Form and Click F5 to run the Program.


If you have any questions or suggestions about Image Slideshow Using VB.Net, please contact me throught our contact page.

Download the Image Slideshow Using VB.Net full source code here.


Reader might read also:




Facebook Comments
(Visited 325 times, 1 visits today)


Please enter your comment!
Please enter your name here