المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem with quitting an application



C# Programming
10-15-2009, 04:51 AM
Hi,

I have an application used to print certain product info sheets. It is normally launched as a conventional application and works exactly as intended. The associated database editor can also launch it (using Process.Start()) to print any changed product sheets; in that case the application prints correctly but remains open after completing its work. If I call this.Close() explicitly from anyplace other than the Quit menu item handler an exception is thrown; using Application.Exit() or Environment.Exit() has no effect. Looking at the Process documentation on MSDN yields no obvious clues.

How can I have the application quit automatically after being launched by the database editor?

Thanks in advance,
-Frank Alviani