1 Replies - 4011 Views - Last Post: 02 June 2009 - 03:05 AM Rate Topic: -----

#1 Swannie  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 2
  • Joined: 02-June 09

Determine if cash drawer is open or closed in VB6

Posted 02 June 2009 - 02:35 AM

Hi there,
I open a cash drawer that is connected to a posiflex POS printer (see code below) in VB6.
I want to know if it is possible to determine if the drawer is open or close. Any suggestions??
Public Sub OpenDrawer()
	Open "LPT1" For Output As #1
	Print #1, Chr$(27); Chr$(112); Chr$(0)
	Close #1
End Sub

Is This A Good Question/Topic? 0
  • +

Replies To: Determine if cash drawer is open or closed in VB6

#2 vacvac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 01-June 09

Re: Determine if cash drawer is open or closed in VB6

Posted 02 June 2009 - 03:05 AM

I just find some code, may it help
Function OpenCashDrawer(x_Comm_Obj As MSComm)

x_Comm_Obj.CommPort = 1

If x_Comm_Obj.PortOpen = True Then
x_Comm_Obj.PortOpen = False
Else
End If

With x_Comm_Obj
.Settings = "300,n,8,1"
.PortOpen = True
.Output = String(10, "A")
.PortOpen = False
End With

End Function


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1