VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This code gives the length of alphabets and numbers in pixels.As you might need while alignment in

Vishal V. Kulkarni  (6 Submissions)   Windows API Call/Explanation   Visual Basic 5.0   Unknown Difficulty   Tue 4th September 2001   Mon 8th February 2021

This code gives the length of alphabets and numbers in pixels.As you might need while alignment in reports or during producing txt

API Declarations


'Purpose : This code gives the length of alphabets and numbers in
' pixels.As you might need while alignment in reports or
' during producing txt files.
' Remember length of w = 8 pixels
' length of W = 11 pixels
' But w or W as has a length of 1 character as len(w)=len(W)=1
'This code needs a textbox text1 as default to get input of the desired
'character and text2 for viewing length in pixels

'Please do not hesitate to contact the author for such problems.
'Forward your querries to [email protected]

Private Type Size
cx As Integer
cy As Integer
End Type
Private Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, ByVal lpsz As String, ByVal cbString As Long, lpsize As Size) As Long

Rate This code gives the length of alphabets and numbers in pixels.As you might need while alignment in (1(1 Vote))
This code gives the length of alphabets and numbers in pixels.As you might need while alignment in .bas

This code gives the length of alphabets and numbers in pixels.As you might need while alignment in Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters