By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,062 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

cOde for LEDs using parallel ports

P: 2
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
Share this Question
Share on Google+
1 Reply


sashi
Expert 100+
P: 1,754
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.