所以我想从一个小文本框开始,并根据需要展开它 但是,我传递的字体(textBoxComment.Font)产生语法错误,我无法编译代码。 “fontinfo的值无法转换为system.drawing.font vb.net”
有办法解决这个问题吗?
Private Sub textBoxComment_TextChanged(sender As Object, e As EventArgs)
Dim size As Size = Windows.Forms.TextRenderer.MeasureText(textBoxComment.Text, textBoxComment.Font)
textBoxComment.Width = size.Width
textBoxComment.Height = size.Height
End Sub
使用VS-2010,定位.Net 4.0 Framework