您現在的位置是:首頁 >動態 > 2022-11-26 02:34:26 來源:
notifying是什么意思(notifyicon)
大家好,小霞來為大家解答以上的問題。notifying是什么意思,notifyicon這個很多人還不知道,現在讓我們一起來看看吧!
1、public partial class Form1 : Form { public Form1() { InitializeComponent(); this.CenterToScreen(); } private void Form1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && e.Clicks == 1) { this.label1.Text = "您單擊了鼠標左鍵!"; } else if (e.Button == MouseButtons.Right && e.Clicks == 1) { this.label1.Text = "您單擊了鼠標右鍵!"; } } private void Form1_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && e.Clicks == 2) { this.label1.Text = "您雙擊了鼠標左鍵!"; } else if (e.Button == MouseButtons.Right && e.Clicks == 2) { this.label1.Text = "您雙擊了鼠標右鍵!"; } } }這樣可以判斷是鼠標左鍵還是右鍵了leftdown rightdown。
本文到此分享完畢,希望對大家有所幫助。