Start New Discussion within our Software Development Community

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.

Thanks and appreciate for you guys help.


Below is the coding for the calling with the MsgBox"Ring Ring"
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.

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

I don't have any help for your first problem, but go to for a simple port IO solution. I've used it in a number of computer-to-realworld interface projects with great results. I've also used it in just about all Windows OS's from Win95 up though XP Pro. I even used it with a home-made 8255 PPI ISA card with no problems.

This article has been dead for over six months. Start a new discussion instead.