2
我在GUI應用程序中的ImageList中有幾個圖標。我想從這個列表中設置通知圖標,但問題是它只接受圖標實例而不是圖像。如何將ImageList中的圖像轉換爲圖標類型?
System.Windows.Forms.NotifyIcon trayIcon = ...;
System.Windows.Forms.ImageList notifierImageList = ...;
trayIcon.Icon = notifierImageList.Images[0]; //This fails since no such cast exist
謝謝。
非常感謝! – Mehran