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