using system.windows.forms;
#region 最小化系統托盤
private
void
initialtray()
#endregion
#region 視窗狀態改變
private
void
mainwindow_statechanged
(object sender,
eventargs e)
}#endregion
#region 托盤圖示滑鼠單擊事件
private
void
notifyicon_mousedoubleclick
(object sender,
system.windows.forms.mouseeventargs e)
else}}
#endregion
}}
將圖示替換成下面內容,意思就是讀取程式圖示,來作為托盤圖示
this
.notifyicon.icon = system.drawing.icon.
extractassociatedicon
;
最小化到托盤
notifyicon notifyicon1 void inittraymenu 在建構函式時呼叫此函式 void notifyicon1 click object sender,eventargs e private void menuitem1 click object sender,syste...
C 最小化到托盤
define wm showtask wm user 1 void ctestdlg onsyscommand uint nid,lparam lparam else cdialog onsyscommand nid,lparam begin message map ctestdlg,cdialog...
最小化程式到托盤
引用 所謂的 托盤 在windows系統介面中,指的就是下面任務條右側,有系統時間等等的標誌的那一部分。在程式最小化或掛起時,但有不希望佔據工作列的時候,就可以把程式放到托盤區。一 托盤程式設計相關函式 把程式放到托盤上的本質就是先在托盤區繪製乙個圖示,然後把程式隱藏不見,再對托盤的圖示進行訊息處理...