1. On Saturday September 3RD, 2016 this community will be shutdown permanently.

    The time has come to close this community. I no longer have any interest in Visual Studio programming and my efforts to find someone to take over the community has failed.

    If anyone is interested in acquiring the database contact me and I will make it available for you.

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

    DN Admin Administrator
    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Messages:
    12,048
    Likes Received:
    258
    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
     

Share This Page