-
Mar 31st, 2012, 11:45 AM
#1
Thread Starter
Addicted Member
Picturebox changing image
I am trying to make a 'puppet' change into a ball when I press e.g. the right arrow key. I used getasynckeystate(keys.right) to check for the key in a timer. The moving is working well but I don't have an idea how I can make it change in a picture of the 'puppet' changing which then changes into a ball. Does someone know how to do this?
Thank you, Nick.
-
Mar 31st, 2012, 11:55 AM
#2
Hyperactive Member
Re: Picturebox changing image
Code:
PictureBox1.Image = My.Resources.picname
I think that's what you wanted
-
Mar 31st, 2012, 12:11 PM
#3
Thread Starter
Addicted Member
Re: Picturebox changing image
no, I know how to change it but I don't know how to make it changing to a ball with another pic between
-
Mar 31st, 2012, 12:48 PM
#4
Hyperactive Member
Re: Picturebox changing image
Put this code into your event for when you press the key
Code:
PictureBox1.Image = My.Resources.CHANGINGIMAGE
Timer1.Interval = 2000 'displays the next image in 2 sec
Timer1.Enabled = True
and add a timer then add this code
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
PictureBox1.Image = My.Resources.BALLIMAGE
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|