以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]如何获得Graphics的宽度和高度?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=68854)

--  作者:yinyb36
--  发布时间:2015/5/26 12:46:00
--  [求助]如何获得Graphics的宽度和高度?
示例中:

Dim p As WinForm.Painter = e.Form.Controls("Painter1")
Dim
g As Graphics = p.Graphics
Dim
fnt As New Font("宋体",16)
Dim
msg As String = "I Like Foxtable"
g.DrawString(msg,fnt,Brushes.Red,10,10)
p.Repaint()


只能获得p的宽度和高度,怎么获得g的宽度和高度?


--  作者:Bin
--  发布时间:2015/5/26 13:41:00
--  
G 是一个绘画对象.没有 宽 高 而言



--  作者:Bin
--  发布时间:2015/5/26 13:42:00
--  
https://msdn.microsoft.com/zh-cn/library/system.drawing.graphics.aspx