I was trying to launch IE using Process class in .NET. I wanted to get
notified when
IE is closed. I subscribed to exited event in Process class. When I close IE
manually
the event handler is never called. What I am doing wrong here? The following
is the code:
private void button1_Click(object sender, System.EventArgs e)
{
string file = @"IExplore.exe";
ProcessStartInfo si = new ProcessStartInfo( file );
process.StartInfo = si;
process.Start();
process.Exited += new EventHandler(process_Exited);
}
private void process_Exited(object sender, EventArgs e)
{
}
Thanks in advance
KDV - 16 Mar 2005 21:21 GMT
I got it. I have to turn on EnableRaisingEvents.
process.EnableRaisingEvents = true;
> I was trying to launch IE using Process class in .NET. I wanted to get
> notified when
[quoted text clipped - 17 lines]
>
> Thanks in advance