Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
how to change image on mouse click event of the picture box
Posted 3-Dec-12 23:39pm

1 solution

Rate this: bad
good
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.
  Permalink  
v3
Comments
mohitjain1943 at 5-Dec-12 1:03am
   
actually when i want we click on image next image will be shown
VitorHugoGarcia at 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)



Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2014
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