Hi anyone could help me...

let say i have a button click event
example :

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Call Save_Action()
End Sub

then i can call the event using this
btnSave_Click(sender, e)

now my question is...i use LabelLink

Private Sub lnkFromPR_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lnkFromPR.LinkClicked
' do something
End Sub

how i call this event...i try this but cant work
Call lnkFromPR_LinkClicked(sender, e)

..i try this but cant work Call lnkFromPR_LinkClicked(sender, e)

I'm sure that e is of type System.EventArgs but now it should be of type LinkLabelLinkClickedEventArgs

Here's one way to do it

' Get selected link
Dim thisLink As LinkLabel.Link
' Just take the first link
thisLink = LinkLabel1.Links.Item(0)
' Call event handler
LinkLabel1_LinkClicked(LinkLabel1, New LinkLabelLinkClickedEventArgs(thisLink))

You're calling event handlers like they were procedures, you should do some redesigning for your program's logic.

HTH

Yeah! its work.

Thanks a lot. ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.