我發現當我爲contextmenustrip(右鍵單擊菜單)執行show()方法時,如果位置在它屬於的窗體的外部,它顯示在任務欄上也是如此。顯示一個沒有顯示在任務欄上的ContextMenuStrip
我想創建一個右擊菜單,當點擊notifyicon時,但由於菜單懸停在系統托盤上方而不是在窗體內(因爲窗體可以在右擊時最小化),它顯示在一些奇怪的原因
任務欄下面是目前我的代碼:
private: System::Void notifyIcon1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
if(e->Button == System::Windows::Forms::MouseButtons::Right) {
this->sysTrayMenu->Show(Cursor->Position);
}
}
做什麼選擇我需要設置,因此不會出現在任務欄上的空白處理。
同上,我有同樣的問題/錯誤。 – 2009-04-13 18:59:05