467,151 Members | 928 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

cOde for LEDs using parallel ports

Hi everyone. Hope you guys can help me. Attached below are VB6 codes for a hand phone to call to a modem. When the action is executed, a message box will pop out ‘Ring Ring’. I just want to know is there anyone out there have the codes for SMS where when the action is executed, a message box will pop out.

On the other hand, I also need some simple codes (VB6) for 8 LEDs lights for parallel ports.

[B<u>]Below is the coding for the calling with the MsgBox"Ring Ring" [/b]</u>

Private Sub Form_Load()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True

' Send the attention command to the modem.
'MSComm1.Output = "AT" + Chr$(13)
' Wait for data to come back to the serial port.

Do
DoEvents
Loop Until MSComm1.InBufferCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpen = False

End Sub

Private Sub MsComm1_OnComm()

Select Case MSComm1.CommEvent
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub

Private Sub Form_a()
MSComm1.PortOpen = False
End Sub
Nov 9 '06 #1
  • viewed: 2796
Share:
1 Reply
sashi
Expert 1GB
Hi everyone. Hope you guys can help me. Attached below are VB6 codes for a hand phone to call to a modem. When the action is executed, a message box will pop out ‘Ring Ring’. I just want to know is there anyone out there have the codes for SMS where when the action is executed, a message box will pop out.

On the other hand, I also need some simple codes (VB6) for 8 LEDs lights for parallel ports.

[B<u>]Below is the coding for the calling with the MsgBox"Ring Ring" [/b]</u>

Private Sub Form_Load()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True

' Send the attention command to the modem.
'MSComm1.Output = "AT" + Chr$(13)
' Wait for data to come back to the serial port.

Do
DoEvents
Loop Until MSComm1.InBufferCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpen = False

End Sub

Private Sub MsComm1_OnComm()

Select Case MSComm1.CommEvent
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub

Private Sub Form_a()
MSComm1.PortOpen = False
End Sub
Hi there,

I think am able to help you on the parallel port curcuit, it's also know as parallel port relay curcuit, run a simple search on google.com. Good luck & take care.
Nov 9 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Joseph Suprenant | last post: by
21 posts views Thread by The Man With The Harmonica | last post: by
11 posts views Thread by karan | last post: by
6 posts views Thread by agnivesh | last post: by
11 posts views Thread by Timothy Smith | last post: by
4 posts views Thread by Chris Lasher | last post: by
1 post views Thread by luco | last post: by
4 posts views Thread by jmarcrum | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.