Šta je novo?

VB6 - Kako ispisati text po vertikali na printeru ?

VGagi

Čuven
Učlanjen(a)
08.09.2002
Poruke
377
Poena
620
Koristio sam dole navedenu proceduru. Problem je sto ona ne radi na
printeru iako prihvata Printer kao objekt. Kad je objekt Picture, radi
savrseno. Ima li neko ideju kako da resim ovaj problem ?

'Rotate Text Sub Begins Here

Public Sub RotateText(Degrees As Integer, obj As Object, fontname As String, _
Fontsize As Single, X As Integer, Y As Integer, Caption As String)

Dim RotateFont As LOGFONT
Dim CurFont As Integer, rFont As Integer, foo As Integer

RotateFont.lfEscapement = Degrees * 10
RotateFont.lfFaceName = fontname & Chr$(0)
If obj.FontBold Then
RotateFont.lfWeight = 800
Else
RotateFont.lfWeight = 400
End If

RotateFont.lfHeight = (Fontsize * -20) / Screen.TwipsPerPixelY
rFont = CreateFontIndirect(RotateFont)
CurFont = SelectObject(obj.hdc, rFont)
obj.CurrentX = X
obj.CurrentY = Y
obj.Print Caption

'Restore
foo = SelectObject(obj.hdc, CurFont)
foo = DeleteObject(rFont)

End Sub
 
Vrh Dno