樂山網(wǎng)站seo營(yíng)銷網(wǎng)站建設(shè)都是專業(yè)技術(shù)人員
?返回按鈕的點(diǎn)擊坐標(biāo)(按鈕本身的相對(duì)位置)主要用于自繪控件時(shí)響應(yīng)點(diǎn)擊對(duì)應(yīng)的數(shù)據(jù)變化。效果如下圖:
?
?代碼實(shí)現(xiàn)
private void button1_MouseClick(object sender, MouseEventArgs e){Point p = e.Location;this.Text = p.ToString();}
?利用?MouseEventArgs 參數(shù)獲取坐標(biāo)。
特此記錄
anlog
2023年12月25日