|
-
May 15th, 2001, 09:51 AM
#1
Ring Indicator
Hi All,
I am developing an EPOS System using VB 6.
I have a Cash Register on my Com Port 1, that opens whenever a randon string is sent to the Com Port.
My problem is that I want to detect if the Cash Register is Open or Closed.
From what I got from the manufacturers of the Cash register I need to use the Ring Indicator to test if one of the Pins in the Com port is of Status High or Not.
Has anyone worked on this problem before ?
Is there any code present for this functionality ?
Thanks
Navs
-
May 15th, 2001, 01:54 PM
#2
Re: Ring Indicator
You need to use the MsComm Control, The Control will fire a event when the ring indicate.
Create a form and put the Microsoft Comm control in it.
then past this code
Private Sub Form_Load()
With MSComm1
.CommPort = 1 'Put your port
.Settings = "9600,N,8,1" 'And settings here
.Handshaking = comNone
.PortOpen = True
End With
End Sub
Private Sub MSComm_OnComm()
Select Case MSComm1.CommEvent
Case comEvRing
MsgBox "RING!" 'Ring detected
Case Else
'Handle other events
End Select
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|