Polling Message Queues

G

Guest

I've had to separate my application into 2 apps. I need to second app to poll
the message queue for certain messages from the main app. Does someone have
some code on how to do this? I have the first app sending the messages, but
only have the second app able to respond once. The second app is started from
the first app as an independent process.

Thanks,
Susan
 
N

Nicholas Paldino [.NET/C# MVP]

Susan,

What kind of messages are you talking about? Do you mean windows
messages? If so, then you can just override the WndProc method on your form
and you will be able to process those messages (assuming that the messages
are sent to that window).

If you mean MSMQ messages, then take a look at the System.Messaging
namespace, as you can use that to read and write to message queues.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top