Need help getting code to pause then display image

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2008
Posts: 27
Reputation: Sheryl99 is an unknown quantity at this point 
Solved Threads: 0
Sheryl99 Sheryl99 is offline Offline
Light Poster

Need help getting code to pause then display image

 
0
  #1
Sep 25th, 2008
I am writing a simple application in VB.NET to view JPG files. I have a slide show option, and can only get my PictureBox1 to display the last photo. ComboBox1 contains the directory and file information for each file.

Here is my code. Thanks for your help!

Private Sub cmdSlideShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSlideShow.Click
Dim x As Integer
With ComboBox1
For x = 0 To (.Items.Count) - 1
'display file name on the form
labFile.Text = .Items(x).ToString
PictureBox1.ImageLocation = .Items(x).ToString
'wait for 5 seconds before displaying the next photo
'this seems to work okay, except the photo doesn't display
Threading.Thread.Sleep(TimeSpan.FromSeconds(5).TotalMilliseconds)
Next
End With
End Sub
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC