|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Method does not have same signature etc...AddHandler newbtnPick.Click, AddressOf newbtnPick_Click Private Sub newbtnPick_Click() End Sub I get an error: Method 'Public Sub newbtnPick_Click()' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'. So of coutse I added ByVal sender As Object, ByVal e As EventArgs to give me Private Sub newbtnPick_Click(ByVal sender As Object, ByVal e As EventArgs) End Sub In fact even this does nto work: Private Sub newbtnPick_Click(ByVal sender As Object) End Sub Why do I need the second parameter? And I am curious, how does it know I will need the sender object? Thanx, >Why do I need the second parameter? And I am curious, how does it know I You need to make sure the method signature matches the delegate>will need the sender object? signature. It doesn't matter if you're actually going to use the parameters in your code or not. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
Re: ActiveX raise event - attn Walter Wang
Selecting a single node in 'XML' Graph control webreq.getresponse exceptions More than one method is found with VB but not with C# Application.StartupPath Adding a Web Reference into a Windows Project turn off assertions in VB 2005 How to read XML from a string variable?? Add Icons to %SystemRoot%\system32\SHELL32.dll |
|||||||||||||||||||||||