Thanks for the suggestion, but the odd thing is: when I use Process.Kill,
the main window does not close, but remains open, which is why I was trying
to use the CloseMainWindow() method.
For some reason: when I issue a Process.Kill, the process itself is killed,
but the user window remains open, which is causing an issue.
Thanks
Andy
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Process.Kill is your answer, note that this does nothing to allow the
process to terminate in a nice way.
Process.CloseMainWindow should be prefered.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Andy" <An**@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com... Is there a way to force a window to close without displaying a popup
asking:
"Windows cannot end this program....If you choose to end the program
immediately, you will lose any unsaved data."
This is a process I am calling and controlling through the code, but I
defiantely want the process to close the window without any user
intervention. Can I force this to close?
The Process.CloseMainWindow() does not seem to have any overrides that
will
simulate the "End Now" button.
Thanks
Andy