Uhm...
A couple of questions...
Why using or redefining an event that already exists (KeyPressed)?
I think your event definition is not quite correct cuz it looks to a
delegate to me ;-)
Public Event KeyPressed(ByVal Character As String, ByVal KeyCode As Integer)
' Event?! I don't think so...
Delegate Sub MyHandler(sender As Object, e As EventArgs) 'Delegate
My event definition would look like this...
Public Event MyEvent As MyHandler 'Event
In your code you have something like this...
keyboardHandler.KeyPressed += new System.EventHandler(this.HandleKeyPress);
You're using EventHandler Delegate and it doesn't match your event's
definition...
EventHandler Definition is like this...
Public Delegate Sub EventHandler(ByVal Sender As Object, ByVal e As
EventArgs)
it's totally different to yours...
Regards,
--
Angel J. Hernández M.
MCSD
"Frank Rizzo" <no****@nospam.com> escribió en el mensaje
news:eg**************@TK2MSFTNGP09.phx.gbl...
Hello, I have a library written in vb.net that I want to use in my c#
project. The library has an event written as:
Public Event KeyPressed(ByVal Character As String, ByVal KeyCode As
Integer)
I am trying to wire up this event in my c# class without success. I've
tried the following below, but obviously the method signature doesn't
match:
keyboardHandler.KeyPressed += new
System.EventHandler(this.HandleKeyPress);
Any ideas?