Pause images in Picturebox

04-11-2006, 01:12 PM
I have a loop that displays various images in order in a picture box and am having trouble figuring out how to pause each image. I tried Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'and then during the loop:
For i = 1 To words.Length
k = GetChar(textSpeech.Text, i)
If k <> " " Then
s = Application.StartupPath() & "\video\" & k & "-ani.gif"
pbSigns.Image = Image.FromFile(s)
End If
' If i = words.Length Then
' End If
Unfortunately this does not seem to work. I can get it to work if I thread it but in this case thats kind of a waste as this is all the program does. I would be grateful for any and all suggestions. Thank you in advance.

04-11-2006, 07:50 PM
You could place the image-changing code in a timer tick event, with the timer intreval set to the desired time.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum