關掉程式重新執行程式的方法
PCHAR FullPrgmPath;
FullPrgmPath = PCHAR(Application->ExeName.c_str());
//ShowWindow(Form1->Handle, SW_HIDE);
WinExec(FullPrgmPath, SW_SHOW); // Or better use the CreateProcess function
FullPrgmPath = PCHAR(Application->ExeName.c_str());
//ShowWindow(Form1->Handle, SW_HIDE);
WinExec(FullPrgmPath, SW_SHOW); // Or better use the CreateProcess function
Application->Terminate(); // or: Close;
留言
張貼留言