1
這是我到目前爲止有:如何更改代碼將NotifyIcon1圖標
if (label1.Text == "On")
{
notifyIcon1.Icon = Image.FromFile("@C:\Users\Alex\Downloads\On.ico");
}
我該怎麼辦讓圖標等於改變呢?
這是我到目前爲止有:如何更改代碼將NotifyIcon1圖標
if (label1.Text == "On")
{
notifyIcon1.Icon = Image.FromFile("@C:\Users\Alex\Downloads\On.ico");
}
我該怎麼辦讓圖標等於改變呢?
這應該工作:除了明顯的,我把@之前的報價。這可能無關緊要,只是我這樣做。
notifyIcon1.Icon = System.Drawing.Icon.ExtractAssociatedIcon(@"C:\Users\Alex\Downloads\On.ico");
這可以幫助你!
你使用的是WPF,WinForms,還有其他的東西嗎?什麼類型是'notifyIcon1'?你到目前爲止有什麼問題? –