Application->Terminate();
return;

或者:
exit(0);
Close();
都要在后边加return,否则执行了关闭语句也会把后边代码执行完

黑色头发:http://heisetoufa.iteye.com/