How to manually get instance of Graphics object in WinForms?

前端 未结 5 1096
萌比男神i
萌比男神i 2020-12-19 01:50

I know how to work with object of type Graphics (at least I am able to render images) but I always do that by passing graphics object retrieved from OnPaint method.

5条回答
  •  自闭症患者
    2020-12-19 02:22

    form.CreateGraphics();

    http://msdn.microsoft.com/en-us/library/system.windows.forms.control.creategraphics.aspx

    http://msdn.microsoft.com/en-us/library/5y289054.aspx

提交回复
热议问题