Author Topic: Can i read print errors with wclclient_onData???? Vb6  (Read 17157 times)

Cirujano

  • Guest
Can i read print errors with wclclient_onData???? Vb6
« on: February 07, 2011, 10:15:54 PM »
I use the microsoft generic driver and for print i use this lines:
Code: [Select]
Dim s As String
    s = Chr$(27) + "P$" + Chr$(27) + "PP" + vbCrLf + "BeginPage();" + vbCrLf
    Dim arr() As Byte
    arr = StrConv(s, vbFromUnicode)
    resp = wclClient.Write(arr)

I tried to read the prints errors with this:
But nothing...
Private Sub wclClient_OnData(ByVal Buffer As Variant)
    printerStatus.Caption = Buffer
End Sub


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can i read print errors with wclclient_onData???? Vb6
« Reply #1 on: February 08, 2011, 03:22:35 AM »
Hi,

I don't know what is "print error" but string data can be read as the following

Private Sub wclClient_OnData(ByVal Buffer As Variant)
  Dim s As String
  s = StrConv(Buffer, vbUnicode)
  meAns.Text = meAns.Text + s
End Sub

Of course, Buffer must contain UNICODE string.

Cirujano

  • Guest
Re: Can i read print errors with wclclient_onData???? Vb6
« Reply #2 on: February 08, 2011, 02:34:48 PM »
Thanks mike.

 

Sitemap 1 2 3 4 5 6 7