12-21-2021
03:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-21-2021
03:11 PM
Hello,
I'm trying to call a function from a button I added into a form, the problem is that the handler doesn't allow me to call that function because it requires external parameters, which the handler can't read due to input restrictions.
How can I fix this?
Some code sample:
Public Sub Button
Dim oButton1 As New Button() oForm.Controls.Add(oButton1) AddHandler oButton1.Click, AddressOf oButton1_Click
End Sub
Public Sub oButton1_Click(ByVal oSender As System.Object, ByVal oEventArgs As System.EventArgs) Call MyClickFunction(oParam) End Sub
Solved! Go to Solution.