populate a listbox from a.. function?

Posted by andrew on Stack Overflow See other posts from Stack Overflow or by andrew
Published on 2010-05-17T06:47:55Z Indexed on 2010/05/17 6:50 UTC
Read the original article Hit count: 203

Filed under:

hello

first of all i'm kinda new to C#

I'm trying to do something like this in a C# winforms application

when my app starts, a form starts minimized in the system tray. when i double click it, it opens and sends a request to a qpid broker for some info. then a message is sent back, and received in a listener in my app (i'm not sure code is relevant but i'll post it anyway)

namespace MyApp
{
    public class MyListener : IMessageListener
    {
        public void MessageTransfer(IMessage m)
        {
            //do stuff with m
        }
    }
}

what i'm trying to do is populate a listbox that's in that form with the message received in that function, but i have no idea how to communicate with that specific form from the MessageTransfer function

© Stack Overflow or respective owner

Related posts about c#