Reputation: 87
I have a picturebox on my form. When I click on it, I want it to preform a function (in this case, setting a value to a variable). I, however, have not found any way to do this.
The picturebox, should during runtime, when clicked, set a value to a variable.
I have considered putting a textbox over the picturebox and making it transparent, but I have not found a way to make textboxes transparent via visual basic. There should be a more direct way available?
Can I get some help? Thanks.
Upvotes: 1
Views: 197
Reputation: 159
You can double click on the picture box and it will bring up the code. From there insert the code you want
Private sub picture1_click()
End sub
Upvotes: 1