我使用以下代码。它可以与我的旧爱普生880一起使用,但现在可以打印一个小矩形而不是换页。我认为打印机无法识别Epson ESC / P代码。
Sub WriteCheck(strDate作为字符串,strAmount作为字符串,strWordAmount作为字符串,_ strFirstName作为字符串,strLastName作为字符串,strAddr1作为字符串,_ strAddr2作为字符串,strCity作为字符串,strState作为字符串,strCountry作为字符串,strZip作为字符串)
Dim intI As Integer
Dim intNchS As Integer
Dim strStars As String
' Dim strPrintline As String
Dim strFormFeed As String = ControlChars.FormFeed ', strFileName As String = "G:\VB2010\Check.out"
' Dim swCheck As New StreamWriter(frmMenu.OpenFileDialog1.FileName)
' Dim swCheck As New StreamWriter(strFileName)
' swCheck.WriteLine("test4")
' swCheck.Close()
strStars = "**********"
' strFormFeed = Chr(12)Fswcheck
' Calculate how many stars to print
intNchS = Fix((73 - lngLenStr) / 2)
If (intNchS < 1) Then
intNchS = 1
ElseIf (intNchS > 10) Then
intNchS = 10
End If
' Print checkF
'' Print #1, strFormFeed 'new page
swCheck.Write(strFormFeed)