作者oogtoo (只吃棒棒不吃糖)
看板C_Sharp
標題[問題] 圖片跟著滑鼠位置會頓
時間Sat Jan 6 01:59:00 2018
如題
最近在寫formapp會遇到使用不同圖檔時
寫跟著滑鼠位置會有頓頓的現象
程式碼都是
private void form1_MouseMove(object sender, MouseEventArgs e)
{
picturebox.Location = new Point(MousePosition.X - 500, 275);
}
有些可以順順的跟著
有些則是滑鼠移動一段距離才跟上
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.91.230
※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1515175143.A.164.html
→ testPtt: 因為是用cpu去跑01/06 08:58
有辦法改善嗎
※ 編輯: oogtoo (114.137.79.75), 01/06/2018 14:08:02
→ testPtt: directx 01/06 16:15
→ testPtt: 或是form開啟DoubleBuffer 01/06 16:23
推 lightyen: 用wpf或uwp開發程式吧 01/06 22:02
推 anumis: 不要用picturebox,自已在form paint畫 01/07 18:42