My dll has some real-time messages which are printed out using:
Console.Writeline("XYZ Message");
I have referenced this dll in my C# Windows form application. The messages are then printed out in real-time using:
public MyClientMainForm()
{
AllocConsole();
InitializeComponent();
}
But using this way I am launching a separate console window for displaying the messages.
Instead of a separate Console window, I wish to re-direct these messages to a Listbox
inside my Winform.
Can someone help me with a simple example for this.