Re: [.NET] 請問一個圖形功能

看板Visual_Basic作者 (㊣烏笨禿,又笨又禿)時間17年前 (2008/05/11 18:16), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串4/4 (看更多)
※ 引述《su27 (su27)》之銘言: : 現在要在picturebox畫線 不動到原圖 是要在哪宣告 : 我試過的方法 畫出來的線 都顯示在form 上面 : 我想到的方案 把圖放入bitmap 在上面畫好 在載入進去 不用載入吧,直接在buffer裡面做就好了 dim b as bitmap = new bitmap(picbox1.width, picbox1.height) '如果要取現有圖片就是 dim b as bitmap = new bitmap("<圖片檔名>") dim g as graphics = graphics.fromimage(b) '然後畫畫… picbox1.image=b 別人的程式寫到最後好像會 g.dispose() 我是覺得可以不要,所以沒寫 : 這樣可行嗎 還是有更簡單的方法 很簡單啦,bitmap很快的 就只是多一行而已 不用擔心這個那個,用就對了   -- Batch 2 update (5/10) - 西班牙宗教審訊 - 主教 - 地獄阿婆 - AND LOTS MORE Unleashed Pythonesque pleasure, fully l10n'ed for Traditional Chinese Spam-a-lot and prosper with the Monty Python! ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ 蒙帝派松正體中文計畫 http://www.youtube.com/user/JamesBondXD ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.115.214.202

05/12 10:51, , 1F
Bitmap有CreateGraphics()?
05/12 10:51, 1F

05/12 12:43, , 2F
有!不要懷疑!
05/12 12:43, 2F

05/12 12:44, , 3F
……對不起忘記了,真蠢…是graphics.fromimage(bitmap)
05/12 12:44, 3F
※ 編輯: MOONRAKER 來自: 59.115.196.81 (05/12 12:44) ※ 編輯: MOONRAKER 來自: 59.115.198.248 (05/12 20:10)
文章代碼(AID): #189iTkWs (Visual_Basic)
文章代碼(AID): #189iTkWs (Visual_Basic)