Click here to Skip to main content
15,891,033 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPaint Event Problem Pin
Clark Kent12315-May-12 3:52
professionalClark Kent12315-May-12 3:52 
AnswerRe: Paint Event Problem Pin
Dave Kreskowiak15-May-12 4:13
mveDave Kreskowiak15-May-12 4:13 
QuestionRe: Paint Event Problem Pin
Clark Kent12316-May-12 2:22
professionalClark Kent12316-May-12 2:22 
AnswerRe: Paint Event Problem Pin
Dave Kreskowiak16-May-12 4:54
mveDave Kreskowiak16-May-12 4:54 
GeneralRe: Paint Event Problem Pin
Clark Kent12316-May-12 4:56
professionalClark Kent12316-May-12 4:56 
GeneralRe: Paint Event Problem Pin
Dave Kreskowiak16-May-12 7:05
mveDave Kreskowiak16-May-12 7:05 
GeneralRe: Paint Event Problem Pin
Clark Kent12316-May-12 7:27
professionalClark Kent12316-May-12 7:27 
AnswerRe: Paint Event Problem Pin
Luc Pattyn15-May-12 14:31
sitebuilderLuc Pattyn15-May-12 14:31 
GeneralRe: Paint Event Problem Pin
Clark Kent1238-Nov-12 4:30
professionalClark Kent1238-Nov-12 4:30 
QuestionChanging JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 12:02
Dr David Johnson PhD14-May-12 12:02 
AnswerRe: Changing JPG in picturebox with loop Pin
Dave Kreskowiak14-May-12 13:18
mveDave Kreskowiak14-May-12 13:18 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 15:29
Dr David Johnson PhD14-May-12 15:29 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn14-May-12 15:43
sitebuilderLuc Pattyn14-May-12 15:43 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 17:14
Dr David Johnson PhD14-May-12 17:14 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn14-May-12 17:34
sitebuilderLuc Pattyn14-May-12 17:34 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 17:59
Dr David Johnson PhD14-May-12 17:59 
GeneralRe: Changing JPG in picturebox with loop Pin
dg6yhw1115-May-12 6:38
dg6yhw1115-May-12 6:38 
I'd like to amplify the other excellent answers a bit.

I am a VB 6 programmer so I may refer to methods that have changed but they are described in the Help.

You need to have a timer to slow down the process.

Whenever the timer acts, you need to
1 - load the image into the picturebox picturebox.image=...
2 - refresh the picturebox by calling the Refresh picturebox.refresh (may also be Redraw check the Help)
3 - let Windows process the action. application.DoEvents

Its the DoEvents directive that causes Windows to suspend the current thread and process all messages i.e. the picturebox.Refresh method will be executed.

Search the DoEvents in Help for an excellent discussion and sample code. The sample uses a click event from a button but you can just as easily control the process with a timer.

Your images should change whenever the timer ticks.
Murray

GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD15-May-12 11:24
Dr David Johnson PhD15-May-12 11:24 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn15-May-12 12:06
sitebuilderLuc Pattyn15-May-12 12:06 
QuestionDevshock.Net Pin
Midnight Ahri13-May-12 17:15
Midnight Ahri13-May-12 17:15 
AnswerRe: Devshock.Net Pin
Richard MacCutchan13-May-12 22:01
mveRichard MacCutchan13-May-12 22:01 
GeneralRe: Devshock.Net Pin
Midnight Ahri13-May-12 22:42
Midnight Ahri13-May-12 22:42 
GeneralRe: Devshock.Net Pin
Richard MacCutchan13-May-12 22:48
mveRichard MacCutchan13-May-12 22:48 
AnswerRe: Devshock.Net Pin
Midnight Ahri13-May-12 23:52
Midnight Ahri13-May-12 23:52 
GeneralRe: Devshock.Net Pin
Richard MacCutchan14-May-12 0:05
mveRichard MacCutchan14-May-12 0:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.