Here is something simple using a picturebox, listbox, timer, and a button.
Public Class Form1 Private myFolder As String = "C:\!vb.net\images\" '// your images folder. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For Each img As String In My.Computer.FileSystem.GetFiles _ (myFolder, FileIO.SearchOption.SearchTopLevelOnly, "*") ListBox1.Items.Add(IO.Path.GetFileName(img)) '// load all files from folder into a listbox. Next Timer1.Interval = 2000 PictureBox1.SizeMode = PictureBoxSizeMode.Zoom End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.SelectedIndex = 0 '// select an item. Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Not ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then '// if not last item. ListBox1.SelectedIndex += 1 PictureBox1.Image = Image.FromFile(myFolder & ListBox1.SelectedItem) Else '// if last item selected. ListBox1.SelectedIndex = 0 PictureBox1.Image = Image.FromFile(myFolder & ListBox1.SelectedItem) End If End Sub End Class
Edited 6 Years Ago by codeorder: n/a
i am using visual studio 2015 and trying to export data which i am importing through excel by the user selected Excel file. Now the importing part has been successfully completed i am using OLEDB Connection but Stuck in exporting the same data to a new Excel file. tried ...
I am creating a program that when you print an author, you must show all the information of all the books that the author has written. Add a new attribute in the Author class that will be "BooksWriting: List (Book)".
I have expanded the program so that it also ...
I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using ...