1
我将旧的VB6项目转换为.NET。在VB6项目.TextHeight
和.TextWidth
被用于图片框对象。我从迁移VB6项目后.NET编译器扔了错误'Textheight' is not a member of 'System.Windows.Forms.PictureBox'
'Textheight'不是'System.Windows.Forms.PictureBox'的成员
tmpX = tmpX - (p.TextWidth(tmpStr)/2.0#)
和
tmpY = tmpY - (p.Textheight(tmpStr)/2.0#)
什么是.NET相当于这些?
我对VB6不太了解,但我认为标题和问题本身没有意义,VB.NET中的picturebox控件显示图片,而不是文本,它没有文本属性。什么对象类型如果“P”? – ElektroStudios
@ElektroStudios pictureboxs可以在VB6中做到这一点,标题是迁移后工作室给我的错误消息 – nate
Graphics.MeasureString – jac