intento imprimir el texto en angulo de la sigueinte forma:
Utilizo la clase LOGFONT:
Código:
Y tras esto, hago algo así:Public Declare Function CreateFontIndirect Lib "gdi32" Alias _ "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long Public Declare Function SelectObject Lib "gdi32" (ByVal hDC _ As Long, ByVal hObject As Long) As Long Public Declare Function DeleteObject Lib "gdi32" (ByVal _ hObject As Long) As Long Public Const LF_FACESIZE = 32 Public 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 As String * LF_FACESIZE End Type
Código:
elcaso es que si cambio Printer por un picturebox, en el picturebox se imprime bien, en angulo, pero en la impresora se imprime sin angulo, a 0 grados.Dim fuente As LOGFONT Dim hfont As Long Dim ret As Long Dim prevfont As Long fuente.lfEscapement = 90 * 10 'grados*10 fuente.lfFaceName = "Arial" fuente.lfWeight = 400 hfont = CreateFontIndirect(fuente) prevfont = SelectObject(Printer.hDC, hfont) Printer.Print ("texto a 90 grados") ret = SelectObject(Printer.hDC, prevfont) ret = DeleteObject(hfont)
Sabéis de que puede ser?
Un slaudo y gracias de antemano