Avatar of sungardap
sungardapFlag for Australia

asked on 

C# code to close window/application?

http://www.codeproject.com/KB/COM/complusrunningprocess.aspx?display=PrintAll

I am trying to modify the above application to close after running. What is the command/code to add at the end of main to close the window/application?
C#

Avatar of undefined
Last Comment
abel
ASKER CERTIFIED SOLUTION
Avatar of p_davis
p_davis

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of abel
abel
Flag of Netherlands image

I assume:

   Application.Exit();

is what you are after
SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of abel
abel
Flag of Netherlands image

Tx! Glad I could help :)
C#
C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

98K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo