|
트레이 아이콘을 실행 시킨 후에 프로그램을 종료 시키지 않
고, Os를 종료시킬 때 프로그램을 종료 시키려고 하는데....
트레이 아이콘은 사라지는데... Os가 종료가 되지 않아서
이렇게 질문을 드립니다. 답변 부탁드립니다.(참고로 컴포트를 사용하는데... 컴포트도 Close가 되지 않
고, 다시 프로그램을 실행 시키면 이미 프로그램이 실행 되어 시작 할수 없다고도 나오네여....)
void __fastcall TUSeoulMainForm::TrayIconRestore(TObject *Sender)
{
Show(); //트레이 아이콘에서 폼 창을 띄워 준다.
}
//---------------------------------------------------------------------------
void __fastcall TUSeoulMainForm::TrayIconRunTimerTimer(TObject *Sender)
{
TrayIconRunTimer->Enabled = False;
Hide();
}
//---------------------------------------------------------------------------
void TUSeoulMainForm::TrayIconRun()
{
TrayIcon->Visible = True;
}
//---------------------------------------------------------------------------
void __fastcall TUSeoulMainForm::FormClose(TObject *Sender,
TCloseAction &Action)
{
if(ComPort->Connected)
ComPort->Close();
if(TrayIcon->Visible)
TrayIcon->Visible = False;
if(ComPortTimer->Enabled)
ComPortTimer->Enabled = False;
}
//---------------------------------------------------------------------------
|