Le réseau pour les développeurs > Forums - Accueil > Visual Basic General > show picture doesnt work without msgbox
Poser une questionPoser une question
 

Traitéeshow picture doesnt work without msgbox

  • lundi 2 novembre 2009 12:22rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code

    Hello,

    I am making a picture viewer in vb.net

    when i click a button to show images from a listview it doesnot work without the msgbox!

    i included code

    Thank you for thaking time to help me!!

        Sub shows()
         
            Dim k, s As String
            Dim i, j, m As Integer<br/>''' when i use this, it doesnt work!!!
            'Dim cbz As New Thread(AddressOf shows)
            'cbz.Start()
    
            For i = 0 To ListView1.Items.Count - 1
                'k = ListView1.Items.Item(i).Text
    
                k = ListView1.Items.Item(i).SubItems.Item(2).Text
                'Dim b As String = ListView1.Items.Item(i).SubItems.Item(1).Text
                MessageBox.Show("ListView1.Items.Item(i).SubItems.Item(2).Text")
    
             
    
                pb1.Image = Image.FromFile(k)
               
                Thread.Sleep(3000)
              
            Next
            Exit Sub
        End Sub
     
    
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
           
            Dim crux As New Form
            crux.WindowState = FormWindowState.Maximized
            crux.Size = New Size(20, 20)
            crux.MaximizeBox = False
            crux.MinimizeBox = False
            crux.BackColor = Color.Black
            crux.Text = "Berchmanianum SlideShow Maker 1.0"
            pb1.Dock = DockStyle.Fill
            pb1.BackColor = Color.Black
            pb1.Size = New Size(30, 30)
            pb1.SizeMode = PictureBoxSizeMode.StretchImage
            pb1.BorderStyle = BorderStyle.Fixed3D
            crux.Controls.Add(pb1)
            crux.Show()
            Me.Hide()<br/>''' when i use this, it does not work!!!!
            'Dim cbz As New Thread(AddressOf shows)
            'cbz.Start()
            shows()
        End Sub<br/><br/>
    
    Please advice.

    With kind regards,

    rocky

Réponses

  • lundi 2 novembre 2009 14:59Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi rockydk,

    if you put the code from Shows() in the Timer.Tick then the code ( with the for..next ) will be executed each time the Timer.Tick event is fired. So every 5 sec. your code will be executed ( the whole for..next ).

    As a suggestion you can use the code below:


        Dim ListViewIndex As Integer = -1
        Sub shows(ByVal ListViewIndex As Integer)
            Dim ImageFileName As String
            pb1.image = Nothing
            ImageFileName = ListView1.Items.Item(ListViewIndex).SubItems.Item(2).Text
            pb1.Image = Image.FromFile(ImageFileName)
    
        End Sub
    
        Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
            ListViewIndex = ListViewIndex + 1
            If ListViewIndex <= ListView1.Items.Count - 1 Then
                shows(ListViewIndex)
                Timer1.Start()
            Else
                MsgBox("finished")
            End If
        End Sub
    

    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • jeudi 5 novembre 2009 09:08Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi again,

    ' add this to the button ...
    
    listviewindex = -1
    
    ' and change this:
    
         Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
    
            listviewindex = listviewindex + 1
            If listviewindex < +ListView1.Items.Count - 1 Then
                shows(listviewindex)
                Timer1.Start()
            Else
                MsgBox("De slideshow is afgelopen!")
            End If
          
        End Sub
    
    ' to this ( i don`t know where the plus sign is comming ):
    
         Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
    
            listviewindex = listviewindex + 1
            If listviewindex <= ListView1.Items.Count - 1 Then
                shows(listviewindex)
                Timer1.Start()
            Else
                MsgBox("De slideshow is afgelopen!")
            End If
          
        End Sub
    
    

    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • lundi 2 novembre 2009 13:06JohnWein Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Use a timer.  Load the PictureBox in the Timer.Tick event.
  • lundi 2 novembre 2009 15:27Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi again,

    change the shows method like following:
        Sub shows(ByVal ListViewIndex As Integer)
            Dim ImageFileName As String
            If pb1.Image IsNot Nothing Then
                pb1.Image.Dispose()
            End If
            pb1.Image = Nothing
            ImageFileName = ListView1.Items.Item(ListViewIndex).SubItems.Item(2).Text
            pb1.Image = Image.FromFile(ImageFileName)
    
        End Sub
    



    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • lundi 2 novembre 2009 15:29rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Hello Heslacher,

     

    sorry it works 100%

    the problem was i had i file betrween with the .db extension, i need to load the files with only image extensions

     

    thank you very much

     

    regards,

     

    rocky

Toutes les réponses

  • lundi 2 novembre 2009 13:06JohnWein Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Use a timer.  Load the PictureBox in the Timer.Tick event.
  • lundi 2 novembre 2009 13:11rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Hello John,

     

    Thank you for your response. Could help me on the way with a sample code, i dont know where to start.

    ??
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
          
            Dim crux As New Form
            crux.WindowState = FormWindowState.Maximized
            crux.Size = New Size(20, 20)
            crux.MaximizeBox = False
            crux.MinimizeBox = False
            crux.BackColor = Color.Black
            crux.Text = "Berchmanianum SlideShow Maker 1.0"
            pb1.Dock = DockStyle.Fill
            pb1.BackColor = Color.Black
            pb1.Size = New Size(30, 30)
            pb1.SizeMode = PictureBoxSizeMode.StretchImage
            pb1.BorderStyle = BorderStyle.Fixed3D
            crux.Controls.Add(pb1)
            crux.Show()
            Me.Hide()<br/>''' when i use this, it does not work!!!!
            'Dim cbz As New Thread(AddressOf shows)
            'cbz.Start()
            ''shows()
    timer1.start
        End Sub<br/><br/>

    and the code from Shows in the timer1 tick event gets a out of memory exeption?

    with regards,

    rocky

  • lundi 2 novembre 2009 13:28rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hello John

    Also when i use the timer i ts not working

    here

    pb1.Image = Image.FromFile(k)

    i get out of memory?

    Please advice.

    regards,

    rocky
  • lundi 2 novembre 2009 13:42JohnWein Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Put the following statement as the first statement in the Timer.Tick event:

    Timer1.Stop

    Do you still get an out of memory error?
  • lundi 2 novembre 2009 13:59Malange Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hello John

    Also when i use the timer i ts not working

    here

    pb1.Image = Image.FromFile(k)

    i get out of memory?

    Please advice.

    regards,

    rocky

    did you set your time?

    interval


    Don't judge me, just Upgrade me. Thanks!
  • lundi 2 novembre 2009 14:16rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hello John,

    Yes i set the interval on 5000, 5 seconds, and when i put on the first line of the timer tick event timer.stop i get  the same
    but also this wont work becauase after that would come the for next code and then the timer will be stopped allready?

    rehards,

    rocky
  • lundi 2 novembre 2009 14:40Ganesh Ranganathan - Bangalore, India Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    PictureBox is notorious for the OutOfMemory exception.

    Try loading smaller images with a larger time interval. Also make sure you call Dispose on your image before loading the next one. You could also look at dynamically resizing your images if they are too big


    Ganesh Ranganathan
    [Please mark the post as answer if it answers your question]
    blog.ganeshzone.net
  • lundi 2 novembre 2009 14:44rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hello Ganesh,

    thank you for your reply, the largest image is 791kb this isnot big, is it??

    also when i use dispose i get the same

    regards,

    rocky
  • lundi 2 novembre 2009 14:57rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    my code now still not working

        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
                   Dim crux As New Form
            crux.WindowState = FormWindowState.Maximized
            crux.Size = New Size(20, 20)
            crux.MaximizeBox = False
            crux.MinimizeBox = False
            crux.BackColor = Color.Black
            crux.Text = "Berchmanianum SlideShow Maker 1.0"
            pb1.Dock = DockStyle.Fill
            pb1.BackColor = Color.Black
            pb1.Size = New Size(30, 30)
            pb1.SizeMode = PictureBoxSizeMode.StretchImage
            pb1.BorderStyle = BorderStyle.Fixed3D
            crux.Controls.Add(pb1)
            crux.Show()
            Me.Hide()
            'Dim cbz As New Thread(AddressOf shows)
            'cbz.Start()
            'shows()
            Timer1.Enabled = True
            Timer1.Start()
        End Sub
    
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Dim k As String
            Dim i As Integer
            Timer1.Stop()
    
            For i = 0 To ListView1.Items.Count - 1
                Timer1.Start()
                k = ListView1.Items.Item(i).SubItems.Item(2).Text
                pb1.Dispose()
                'MessageBox.Show(ListView1.Items.Item(i).SubItems.Item(2).Text)
    
                pb1.Image = Image.FromFile(k)
    
            Next
            Exit Sub
        End Sub
    
    please help!
  • lundi 2 novembre 2009 14:59Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi rockydk,

    if you put the code from Shows() in the Timer.Tick then the code ( with the for..next ) will be executed each time the Timer.Tick event is fired. So every 5 sec. your code will be executed ( the whole for..next ).

    As a suggestion you can use the code below:


        Dim ListViewIndex As Integer = -1
        Sub shows(ByVal ListViewIndex As Integer)
            Dim ImageFileName As String
            pb1.image = Nothing
            ImageFileName = ListView1.Items.Item(ListViewIndex).SubItems.Item(2).Text
            pb1.Image = Image.FromFile(ImageFileName)
    
        End Sub
    
        Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
            ListViewIndex = ListViewIndex + 1
            If ListViewIndex <= ListView1.Items.Count - 1 Then
                shows(ListViewIndex)
                Timer1.Start()
            Else
                MsgBox("finished")
            End If
        End Sub
    

    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • lundi 2 novembre 2009 15:24rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Hello Heslacher,

    thank you this works 90% but

    After 5 images i get the out of memory again?

    With kind regards,

    rocky

  • lundi 2 novembre 2009 15:27Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi again,

    change the shows method like following:
        Sub shows(ByVal ListViewIndex As Integer)
            Dim ImageFileName As String
            If pb1.Image IsNot Nothing Then
                pb1.Image.Dispose()
            End If
            pb1.Image = Nothing
            ImageFileName = ListView1.Items.Item(ListViewIndex).SubItems.Item(2).Text
            pb1.Image = Image.FromFile(ImageFileName)
    
        End Sub
    



    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • lundi 2 novembre 2009 15:29JohnWein Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    Replace the Timer1_Tick code with:

      Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Timer1.Stop()
        pb1.image = Image.FromFile(ListView1.Items(0).SubItems(2).Text)
      End Sub
    
    

    Do you get an image without error?
  • lundi 2 novembre 2009 15:29rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    Hello Heslacher,

     

    sorry it works 100%

    the problem was i had i file betrween with the .db extension, i need to load the files with only image extensions

     

    thank you very much

     

    regards,

     

    rocky

  • mercredi 4 novembre 2009 13:46rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hello Heslacher,

    Thank you for your xtra reply!! great
    I have one question about the crux form created after the button3 click event
    when the slideshow is finished and i click the close button and i fire the button3 click event again i get the following error
    cannot acces a disposed object

    how to handle this

    Regards,

    Rocky
  • mercredi 4 novembre 2009 14:03Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Hi again,

    where in the code do you get the exception ?


    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • mercredi 4 novembre 2009 14:49rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    HI,

    In the button3 click event on crux.show

    regards,

    rocky
  • mercredi 4 novembre 2009 14:58Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Thats what i have guessed, but where exactly(wich line) is the exception thrown ?
    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • mercredi 4 novembre 2009 15:20rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    Hi,

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
                   Dim crux As New Form
            crux.WindowState = FormWindowState.Maximized
            crux.Size = New Size(20, 20)
            crux.MaximizeBox = False
            crux.MinimizeBox = False
            crux.BackColor = Color.Black
            crux.Text = "Berchmanianum SlideShow Maker 1.0"
            pb1.Dock = DockStyle.Fill
            pb1.BackColor = Color.Black
            pb1.Size = New Size(30, 30)
            pb1.SizeMode = PictureBoxSizeMode.StretchImage
            pb1.BorderStyle = BorderStyle.Fixed3D
            crux.Controls.Add(pb1)'
    
            crux.Show() 
    '''on this line''
                   
            Timer1.Start()
        End Sub
    
    
  • mercredi 4 novembre 2009 15:34Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hi again,

    in such a case it is really hard to find the problem without the code.

    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • jeudi 5 novembre 2009 08:48rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    Hi,

    Here is the code. Please adjust the path to images, its hardcoded in the form load event.
    The slideshow works but when you click the close button on the form crux and
    you click again on slide the expeption is thrown.
    I have also tried to make a second form in vs,  and try to work like that, but same problem.
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            ListView1.View = View.Details
            ' Add a column with width 80 and left alignment
            ListView1.Columns.Add("Pad", 150, HorizontalAlignment.Left)
    
            ListView1.Items.Add("C:\Documents and Settings\All Users\Documenten\Mijn afbeeldingen\Voorbeelden van afbeeldingen\Blauwe heuvels.jpg")
            ListView1.Items.Add("C:\Documents and Settings\All Users\Documenten\Mijn afbeeldingen\Voorbeelden van afbeeldingen\Waterlelies.jpg")
            ListView1.Items.Add("C:\Documents and Settings\All Users\Documenten\Mijn afbeeldingen\Voorbeelden van afbeeldingen\Winter.jpg")
            ListView1.Items.Add("C:\Documents and Settings\All Users\Documenten\Mijn afbeeldingen\Voorbeelden van afbeeldingen\Zonsondergang.jpg")
    
        End Sub
    
        Sub shows(ByVal listviewindex As Integer)
            'pb1.Image = Nothing
            'imagefilename = ListView1.Items.Item(listviewindex).SubItems.Item(0).Text
            'pb1.Image = Image.FromFile(imagefilename)
            If pb1.Image IsNot Nothing Then
                pb1.Image.Dispose()
            End If
    
            pb1.Image = Nothing
            ImageFileName = ListView1.Items.Item(listviewindex).SubItems.Item(0).Text
            pb1.Image = Image.FromFile(ImageFileName)
    
        End Sub
    
    
        Dim pb1 As New PictureBox
        Dim lbl1 As New Label
        Dim listviewindex As Integer = -1
        Dim ImageFileName As String
    
    
        Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
    
            listviewindex = listviewindex + 1
            If listviewindex < +ListView1.Items.Count - 1 Then
                shows(listviewindex)
                Timer1.Start()
            Else
                MsgBox("De slideshow is afgelopen!")
            End If
          
        End Sub
    
        Private Sub btnSlide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSlide.Click
            Dim crux As New Form
            crux.WindowState = FormWindowState.Maximized
            crux.Size = New Size(20, 20)
            crux.MaximizeBox = True
            crux.MinimizeBox = True
            crux.BackColor = Color.Black
            crux.Text = "Berchmanianum SlideShow Maker 1.0"
            pb1.Dock = DockStyle.None
            pb1.BackColor = Color.Black
            pb1.Size = New Size(18, 18)
            pb1.Size = New System.Drawing.Size(1024, 652)
            pb1.SizeMode = PictureBoxSizeMode.StretchImage
            pb1.BorderStyle = BorderStyle.Fixed3D
         
            crux.Controls.Add(pb1)
            crux.Show()
            Timer1.Start()
        End Sub
    End Class
    
    


    Please advice.

    Regards,

    Rocky
  • jeudi 5 novembre 2009 08:56Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    Hi again,

    that has been easy.


    ' Change this:
    Dim pb1 As New PictureBox
    ' to this:
    Dim pb1 As PictureBox
    
    ' Insert this:
    pb1 = New PictureBox
    ' inside this:
    Private Sub btnSlide_Click.......
    
    


    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • jeudi 5 novembre 2009 09:04rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hi,

    Yes now it doesnt give the exeption but it gives the messagebox.
    How can we let the listview begin from the first item.
    Als it doesnot show the last image in the listview?

    Regards,

    rocky
  • jeudi 5 novembre 2009 09:08Heslacher Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     TraitéeA du code
    Hi again,

    ' add this to the button ...
    
    listviewindex = -1
    
    ' and change this:
    
         Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
    
            listviewindex = listviewindex + 1
            If listviewindex < +ListView1.Items.Count - 1 Then
                shows(listviewindex)
                Timer1.Start()
            Else
                MsgBox("De slideshow is afgelopen!")
            End If
          
        End Sub
    
    ' to this ( i don`t know where the plus sign is comming ):
    
         Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Stop()
    
            listviewindex = listviewindex + 1
            If listviewindex <= ListView1.Items.Count - 1 Then
                shows(listviewindex)
                Timer1.Start()
            Else
                MsgBox("De slideshow is afgelopen!")
            End If
          
        End Sub
    
    

    If you have got questions about this, just ask.
    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/
  • jeudi 5 novembre 2009 09:50rockydk Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hi,

    thank you very much this is great!!!!!!!!

    Thank you fot helping me get true this.

    regards,

    rocky