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.CommPor t = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Setting s = "9600,N,8,1 "
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLe n = 0
' Open the port.
MSComm1.PortOpe n = 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.InBuffe rCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpe n = False
End Sub
Private Sub MsComm1_OnComm( )
Select Case MSComm1.CommEve nt
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub
Private Sub Form_a()
MSComm1.PortOpe n = False
End Sub
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.CommPor t = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Setting s = "9600,N,8,1 "
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLe n = 0
' Open the port.
MSComm1.PortOpe n = 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.InBuffe rCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpe n = False
End Sub
Private Sub MsComm1_OnComm( )
Select Case MSComm1.CommEve nt
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub
Private Sub Form_a()
MSComm1.PortOpe n = False
End Sub
Comment