你可以用3個rich來測試,占的實際寬度是一樣的,但是textWidth,或者len,LenB之類就不一樣了,而且我rich加入了圖片,判斷就更難了,現在只要能判斷字符出來就不錯了!
汽车尾气检测网络系统QQ:357766186__MSN:MSNTHW19850316@
Dim objCn As New Connection
Dim objRs As New Recordset
Dim objRs1 As New Recordset
Private Sub Command1_Click()
objCn.Open "Provider=SQLOLEDB.1;Password=hushimiao;Persist Security Info=True;User ID=sa;Initial Catalog=db_ct;Data Source=CT-ZX2"
objRs.Open "select datalength('我a')", objCn
objRs1.Open "select datalength('aaa')", objCn
If isnull(objRs.Fields(0),0) = isnull(objRs1.Fields(0),0) Then
MsgBox "宽度相同"
Else
MsgBox "宽度不同"
End If
End Sub