Not a programmer but need to create a utility to open a network cash drawer.
We are switching our Point of Sale app and require new cash drawers.
New drawers will work fine with new app but not the old POS application.
Each drawer will have an assigned IP address. I need to create a separate utility to open the drawer at each workstation while we are using both applications.
APG, the drawer manufacturer provided me with the following
1. Connect to the Cash Drawer
Private Sub CashDrawerConnect_Click()
'Close prior to connect (OK)
Winsock1.Close
'Establish connection to device
'ipaddr = "192.168.2.5" 'APGDefaultStaticIPAddress
Winsock1.RemoteHost = ipaddr
Winsock1.RemotePort = 30998 'RequiredPort
Winsock1.Connect
Sleep 250
TxtOpStatus = "Connection to the cash drawer at " &ipaddr& " is established..."
TxtOpStatus.Refresh
End Sub
2. Open the Cash Drawer
Private Sub CashDrawerOpen_Click()
' DrawerOpen (Kick)
If Winsock1.State = sckConnected Then
Winsock1.SendData "opendrawer\0a"
Else
TxtOpStatus = "Not connected to the device"
TxtOpStatus.Refresh
End If
End Sub
I have Visual Studio 2019 but I have never created a Visual Basic program.
Anyone care to take a shot at teaching me the basics?
Utility needs to run under Windows 7 32 bit
Bob
We are switching our Point of Sale app and require new cash drawers.
New drawers will work fine with new app but not the old POS application.
Each drawer will have an assigned IP address. I need to create a separate utility to open the drawer at each workstation while we are using both applications.
APG, the drawer manufacturer provided me with the following
1. Connect to the Cash Drawer
Private Sub CashDrawerConnect_Click()
'Close prior to connect (OK)
Winsock1.Close
'Establish connection to device
'ipaddr = "192.168.2.5" 'APGDefaultStaticIPAddress
Winsock1.RemoteHost = ipaddr
Winsock1.RemotePort = 30998 'RequiredPort
Winsock1.Connect
Sleep 250
TxtOpStatus = "Connection to the cash drawer at " &ipaddr& " is established..."
TxtOpStatus.Refresh
End Sub
2. Open the Cash Drawer
Private Sub CashDrawerOpen_Click()
' DrawerOpen (Kick)
If Winsock1.State = sckConnected Then
Winsock1.SendData "opendrawer\0a"
Else
TxtOpStatus = "Not connected to the device"
TxtOpStatus.Refresh
End If
End Sub
I have Visual Studio 2019 but I have never created a Visual Basic program.
Anyone care to take a shot at teaching me the basics?
Utility needs to run under Windows 7 32 bit
Bob