Click here to Skip to main content
13,050,429 members (111,614 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how to change image on mouse click event of the picture box
Posted 3-Dec-12 23:39pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try this :

Private Sub PictureBox1_Click(sender As System.Object, e As System.EventArgs) Handles PictureBox1.Click
    PictureBox1.Image = Image.FromFile("c:\myImage.jpg")
End Sub

I created a new project with one form, added a PictureBox with an image set at the image field from the properties of that PictureBox. Then added that sc up there just to change the image from file.
mohitjain1943 5-Dec-12 1:03am
actually when i want we click on image next image will be shown
VitorHugoGarcia 5-Dec-12 4:06am
What do you mean ? Did you try the solution provided ? Did it solve your problem ?
Please be more clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100