Call DrawText(picMain.hDc, strData, Len(strData), RC, DT_LEFT Or DT_VCENTER)
private Type Size
cx As Long
cy As Long
End Type
Private Declare Function GetTextExtentPoint Lib "gdi32" Alias "GetTextExtentPointA" (ByVal hdc As Long, ByVal lpszString As String, ByVal cbString As Long, lpSize As Size) As Long
Private sub Form_click()
dim nSize as Size
Call GetTextExtentPoint(form1.hdc, "O", Len("O"), nSize)
msgbox nSize.x '- ширина
msgbox nSize.y '- высота
end sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 101