参考
Dim fnt As New Font("宋体",20)Dim msg As String = "我爱你"Dim gc = basemainform.CreateGraphicsDim size = gc.MeasureString(msg, fnt)msgbox(size.width)