i have 03 pictureboxes in a panel & i have created one Click Event handler for them,
now there's a contextmenustrip inside my form with 03 toolstripmenuitem which are related to those 03 pictureboxes, now i want to call those picturebox click events when i click their name, which are on contextmenustrip using vb.net 2008,
so, how to call
Private Sub picturebox1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picturebox1.Click, picturebox2.Click, picturebox3.Click
from below sub
Private Sub CM_chcS_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles CM_chcS.ItemClickedFor Each pb As PictureBox In Me.AM_chcPb.Controls.OfType(Of PictureBox)()
If e.ClickedItem.Text.ToString = ToolTip1.GetToolTip(pb).ToString Then
Me.chcPwrpb_Click(pb, New System.EventArgs)
i use 'picturebox1_click(pb, nothing)
i use 'picturebox1_click(pb, New System.EventArgs)
but above mentioned not work anymore for me,
what i do now, please help!
Pl. Mark/Proposed as Answer if found your solution Vote as Helpful if related to your topic. Always Motivate others by performing this Action.
View the full article