I have been trying to access a messageloop without opening a form.
That is, I want to be able to receive messages from other applications through the message loop without having a form.
I've read that you can use Application.Run () without an argument to create a loop without a form, but I have no way of sending messages to that loop (that i have figured out)
I've tried using:
[code=c#]
Application.Add MessageFilter(f t);
Application.Mes sageLoopCallbac k mlc = new Application.Mes sageLoopCallbac k(mlc_target);
Application.Reg isterMessageLoo p(mlc);
[/code]
And that messageFilter *DOES* catch a single WM_CLOSE message when I close the entire application, but I cannot seem to get any other messages through there.
I have even tried with creating a form and then hiding it (it flashes on screen, not a big deal), but it doesn't not register itself as the "MainWindowHand le" if its hidden, so I cannot use a Process call to get it.
I was just looking for a way to interact back and forth with a service (I set it to have access to the desktop or nothing worked at all) and I didn't like the custom command as it was only a one way street. (Fun for triggering things, but not much else)
I guess my real goal was to have a "front end" software to a service, that can be run without having to talk via sockets or etc.
Am I missing a fundamental communication possibility here?
That is, I want to be able to receive messages from other applications through the message loop without having a form.
I've read that you can use Application.Run () without an argument to create a loop without a form, but I have no way of sending messages to that loop (that i have figured out)
I've tried using:
[code=c#]
Application.Add MessageFilter(f t);
Application.Mes sageLoopCallbac k mlc = new Application.Mes sageLoopCallbac k(mlc_target);
Application.Reg isterMessageLoo p(mlc);
[/code]
And that messageFilter *DOES* catch a single WM_CLOSE message when I close the entire application, but I cannot seem to get any other messages through there.
I have even tried with creating a form and then hiding it (it flashes on screen, not a big deal), but it doesn't not register itself as the "MainWindowHand le" if its hidden, so I cannot use a Process call to get it.
I was just looking for a way to interact back and forth with a service (I set it to have access to the desktop or nothing worked at all) and I didn't like the custom command as it was only a one way street. (Fun for triggering things, but not much else)
I guess my real goal was to have a "front end" software to a service, that can be run without having to talk via sockets or etc.
Am I missing a fundamental communication possibility here?