Click here to Skip to main content
15,885,925 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to change image on mouse click event of the picture box
Posted

1 solution

Try this :

VB
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.
 
Share this answer
 
v3
Comments
mohitjain1943 5-Dec-12 1:03am    
actually when i want we click on image next image will be shown
_Vitor Garcia_ 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900