| 'Dans la section générale de la feuille 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 'Dans la feuille Private Sub Form_Load() 'VbAndJava 1999/2000 'Guerrault Yonni 'E-Mail : Yonni4@iFrance.com Dim RotateMe As LOGFONT Me.AutoRedraw = True Deg = 270 Size = 20 RotateMe.lfEscapement = Deg * 10 RotateMe.lfHeight = (Size * -20) / Screen.TwipsPerPixelY rFont = CreateFontIndirect(RotateMe) Curent = SelectObject(Me.hdc, rFont) Me.CurrentX = 500 Me.CurrentY = 200 Me.Print ":-)" End Sub |