AllApi.net

[an error occurred while processing this directive]
 
'In general section
Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Const LF_FACESIZE = 32
Private Type LOGFONT
    lfHeight As Long
    lfWidth As Long
    lfEscapement As Long
    lfOrientation As Long
    lfWeight As Long
    lfItalic As Byte
    lfUnderline As Byte
    lfStrikeOut As Byte
    lfCharSet As Byte
    lfOutPrecision As Byte
    lfClipPrecision As Byte
    lfQuality As Byte
    lfPitchAndFamily As Byte
    lfFaceName(LF_FACESIZE) As Byte
End Type
'In form
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net

    Dim RotateMe As LOGFONT
    'Set graphic-mode to 'persistent graphic'
    Me.AutoRedraw = True
    'Rotate degrees
    Deg = 270
    'Size (in points)
    Size = 20
    'Set the rotation degree
    RotateMe.lfEscapement = Deg * 10
    'Set the height of the font
    RotateMe.lfHeight = (Size * -20) / Screen.TwipsPerPixelY
    'Create the font
    rFont = CreateFontIndirect(RotateMe)
    'Select the font n the Form's device context
    Curent = SelectObject(Me.hdc, rFont)
    'Print some text ...
    Me.CurrentX = 500
    Me.CurrentY = 200
    Me.Print ":-)"
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/