Text # ' variabili a dichiarate STATIC
Dim hnFont As Long Dim hoFont As Long Dim lf As LOGFONT Dim Ang As Integer Dim retValue As Long Cls '============= certificazione ================== lf.lfHeight = 12 lf.lfEscapement = 90 * 10 ' inclinazione lf.lfWidth = 12 hnFont = CreateFont(12, 8, (90 * 10), 0, FW_NORMAL, False, False, False, OEM_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 34, "Arial") 'hnFont = CreateFontIndirect(lf) hoFont = SelectObject(hdc, hnFont) 'retValue = TextOut(hdc, 150, 300, Text2, Len(Text2)) retValue = TextOut(hdc, 0, 334, "Test di Controllo OK - By Puglisi - (C)1998", Len("Test di Controllo OK - By Puglisi - (C)1998")) vedi CopiaModificati nel modulo BAS inserire quanto segue Public Const LF_FACESIZE = 32 Public Const LF_FULLFACESIZE = 64 Public Const OEM_CHARSET = 255 Public Const OUT_DEFAULT_PRECIS = 0 Public Const CLIP_DEFAULT_PRECIS = 0 Public Const DEFAULT_QUALITY = 0 Public Const FW_BOLD = 700 Public Const FW_NORMAL = 400 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 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 Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long |