Listen to K8090Board.CommandReceived event in class library

Hi everybody,

I have a problem in listening to the K8090Board’s events in a class library project. I have no windows form like the shipped examples show. So i think this referes somehow to this thread:
http://forum.velleman.eu/viewtopic.php?f=3&t=4580&hilit=events
However this didn’t get me further…

This is how i connect to the board:

...
K8090Board board = new K8090Board();
board.Port = "COM5";
board.Connect();
board.CommandReceived += new CommandReceivedEvent(board_CommandReceived);
..

And here’s the event handler (which is never called):

private void board_CommandReceived(object o, CommandEventArgs args)
{
    //DoSomething
}

It would be great if someone could give me a hint on this…

Thanks in advance!

[quote]I have no windows form like the shipped examples show.[/quote]You need a Windows Forms Application.

So, there’s no way to handle these events inside a .NET class library project?

[quote=“adnul”]So, there’s no way to handle these events inside a .NET class library project?[/quote]It should be possible to handle events in a class library project. As long as you use the resulting assembly file from a Windows Forms Application.