Jump to content

Stampare in visual basic 6


Recommended Posts

Posted

ciao a tutti,

vorrei sapere se, e come, e' possibile inviare tramite l'oggetto printer delle sequenze di ESCape ad una stampante.

ciao e grazie

Xunil79

Posted

Nel mio archivio pattumiera :lol: ho trovato questo, non l'ho mai provato ma forse è quello che ti serve.La funzione dovrebbe bypassare il driver della stampante, che altrimenti interpreta la sequenza ESC come testo paranormale.

Public Declare Function EscapeCodes Lib "gdi32" Alias "Escape" (ByVal hdc&,ByVal nEscape&, ByVal nCount&, ByVal InData$, ByVal lpOutData&) As Long

Public Sub UsePrinterPart(DataToPrint As String)

Const cPASSTHROUGH As Long = 19

Dim pcl_Escape_Tmp As String

pcl_Escape_Tmp = Chr$(Len(DataToPrint) Mod 256) &Chr$(Len(DataToPrint) \

256) & DataToPrint

Printer.CurrentY = ciZero

Printer.Print vbNullString

EscapeCodes Printer.hdc, cPASSTHROUGH, 0, pcl_Escape_Tmp, ByVal 0&

End Sub

Ciao :)

Posted

grazie mille.

provo e ti faccio sapere.

ciao

xunil79

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...