Call System.EventArgs from other EventArgs using VB.net 2008

Discussion in 'Visual Basic .Net' started by DN Admin, Nov 27, 2012.

  1. DN Admin

    Staff Member

    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Good Morning,
    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
    End Sub

    from below sub
    Private Sub CM_chcS_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles CM_chcS.ItemClicked
    For Each pb As PictureBox In Me.AM_chcPb.Controls.OfType(Of PictureBox)() <br/>
    If e.ClickedItem.Text.ToString = ToolTip1.GetToolTip(pb).ToString Then <br/>
    Me.chcPwrpb_Click(pb, New System.EventArgs) <br/>
    End If <br/>
    Next
    End Sub
    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
     
    #1

Share This Page