The GetTextExtentPoint32 function computes the width and height of the specified string of text.
BOOL GetTextExtentPoint32(
HDC hdc, // handle to device context
LPCTSTR lpString, // pointer to text string
int cbString, // number of characters in string
LPSIZE lpSize // pointer to structure for string size
);
Public Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, ByVal lpsz As String, ByVal cbString As Long, lpSize As SIZE) As Long
Private Sub Text1_Change()
Set Me.Font = Text1.Font
Text1.Width = TextWidth(Text1)
Text1.Height = TextHeight(Text1)
End Sub
Сейчас этот форум просматривают: AhrefsBot, Google-бот, Yandex-бот и гости: 99