如何让程序一启动就隐藏到托盘?
我加了个trayicon控件,点窗体上的那个最小化按钮后是可以隐藏到托盘了。可我想程序一启动就隐藏,不要人工干预。谢谢。
[解决办法]
//方法一:__fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner){ TrayIcon1->Visible = true ;}//---------------------------------------void __fastcall TForm1::FormCreate(TObject *Sender){ ShowWindow(Application->Handle,SW_HIDE); Application->ShowMainForm=false; TrayIcon1->Minimize();}//---------------------------------------void __fastcall TForm1::TrayIcon1Restore(TObject *Sender){ ShowWindow(Application->Handle,SW_SHOW); Application->ShowMainForm=true; Form1->Visible = true;}