HI
i am trying to make screen saver in vb.net i m using picturebox and timer (for separation of time), but i cannot attach multiple pictuers in a single picturebox.
can anyone help me ?
Thankx

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.