draw "vertical text" visual basic 6
Private Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (ByVal H As Long, ByVal W As Long, ByVal E As Long, ByVal O As Long, ByVal W As Long, ByVal I As Long, ByVal U As Long, ByVal S As Long, ByVal C As Long, ByVal OP As Long, ByVal CP As Long, ByVal Q As Long, ByVal PAF As Long, ByVal F As String) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Const ANSI_CHARSET As Long = 0
Const FF_DONTCARE As Long = 0
Const CLIP_LH_ANGLES As Long = &H10
Const CLIP_DEFAULT_PRECIS As Long = 0
Const OUT_TT_ONLY_PRECIS As Long = 7
Const PROOF_QUALITY As Long = 2
Const TRUETYPE_FONTTYPE As Long = &H4
Const p_WIDTH As Long = 12
Const p_HEIGHT As Long = 12
Private Sub RotateText(TheText As String, TheAngle As Long)
Dim NewFont As Long
Dim OldFont As Long
NewFont = CreateFont(p_HEIGHT, p_WIDTH, TheAngle, 0, FF_DONTCARE, 0, 0, 0, ANSI_CHARSET, OUT_TT_ONLY_PRECIS, CLIP_LH_ANGLES Or CLIP_DEFAULT_PRECIS, PROOF_QUALITY, TRUETYPE_FONTTYPE, "Arial")
OldFont = SelectObject(Me.hdc, NewFont)
Print TheText
NewFont = SelectObject(Me.hdc, OldFont)
DeleteObject NewFont
End Sub
Private Sub Form_Load()
Dim TheAngle As Long
Me.Show
CurrentX = 300
CurrentY = 150
TheAngle = -900
RotateText "This is a test", TheAngle 'angle in tenths of a degree 'PUT YOUR TEXT HERE
End Sub
Сейчас этот форум просматривают: SemrushBot и гости: 71