-
I have a picture on my form and what i need to do is when you click it something happens. I've tried putting a picture on a command button but it doesn't show up, I've also tried putting the picture over the command button but it just goes behind it. What do I do?
-
Set the command button style property to graphical.
-
Both Picture boxes and image boxes have a click event, so just use a picture box on its own.
Set its appearence property to flat and its borderstyle to none if you want it to look like it's just there on the form rather than in a nice framed picturebox.
If you're planning on having a lot of images on the screen at the same time you should use image boxes instead of picture boxes, they take up a lot less memory but flicker annoyingly when you move them around. I'm writing a sprite control that will set the window region to the same shape as a picture that's put in it (so it will only raise events when you click on the image itself and you can see behind the bits of it which aren't drawn on and I'm going to post it up here for testing but it's right at the bottom of my to do list so don't hold your breath