|
-
Nov 24th, 2007, 08:21 AM
#1
Thread Starter
Lively Member
[RESOLVED] Calling a PictureBox click event from a Button click event
I have a series of PictureBoxes and if the user clicks on one of them, it highlights (changes color). Only one can be highlighted at any given time. I have a button that resets the images to their default but before an image can be highlighted, it has to have the default "normal" applied because that data goes into an array. Afterwords, the first PictureBox needs to be highlighted.
The problem is that PictureBoxes do not have an option to PerformClick(). It seems that I should be able to call the
Code:
PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
but what do I enter for "sender" and "e"? or is this even possible?
Last edited by AlphaScorpious; Nov 24th, 2007 at 08:33 AM.
Reason: Resolved
-
Nov 24th, 2007, 08:32 AM
#2
Thread Starter
Lively Member
Re: Calling a PictureBox click event from a Button click event
Ok, after a "duh" moment, the answer seemed pretty obvious seeing as how VB .Net practically tells you what to do. Here is the solution that appears to work:
Code:
PictureBox1_Click(Button1, System.EventArgs.Empty)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|