I'm developing a windows service that monitors the message queue(RabbitMQ). Whenever a message queued up in the message queue, an event will be fired in the windows service and a windows forms application will be launched which takes queue's message as command-line arguments.
All the coding part is fine. On debug mode, I've verified if the event is firing when a message is found in the queue or not, and yes it does hit the event callback. But i don't see the windows form popping up when the event is fired. Below is how i'm trying to execute the windows form.
Process process = new Process();
process.EnableRaisingEvents = true;
process.Exited+= <exit event handler>
process.Start(new ProcessStartInfo(){
CreateNoWindow=true,
UseShellExecute=false,
ErrorDialog=true,
FileName = "<path to the .exe file of windows form>",
WindowStyle=ProcessWindowStyle.Hidden
});
process.WaitForExit();
I don't even see any error throwing or logged in EventViewer. Any help in this regard is apprecaited.