看板 Visual_Basic 關於我們 聯絡資訊
CreateGraphics 方法建立的 Graphics 可以繪製的範圍是呼叫 CreateGraphics 當時 Control 的大小,所以方法一會被裁切,不然就是每次 Control 大小改變後就重新使用 CreateGraphics 取得新的 Graphics 也是可以。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.160.71.232
MOONRAKER:推,解開我的疑惑 :] 10/26 20:27
applerev:感謝 但是有點搞不懂"Control的大小"指的是啥 10/26 21:24
hamsters:就是可繪製範圍為: 10/26 23:04
hamsters:{x=0,y=0,width=Control.Width,height=Control.Height} 10/26 23:04
applerev:那麼這寬和高的值是怎麼決定的呢? 10/27 01:31
hamsters:就是呼叫 CreateGraphics 當時 Control 的大小 10/27 10:36
saintber:根據最近修改的經驗,Form的Resize似乎發生在參數載入 03/15 22:04
saintber:之後,可以研究一下InitializeComponent 03/15 22:06