You can use this method to make a program that helps the user dial a number. MsgBox "Error " & Err.Number & vbCrLf & _ "When you hear a ringing signal, pick up the " & _ MsgBox "When you hear a busy signal, click OK." & _ ' Ask the user to wait until the phone rings. Loop Until InStr(results, "OK" & vbCrLf) > 0ĬleanPhoneNumber(txtPhoneNumber.Text) & vbCr ' Read the latest data from the serial port. ' Send the attention string to the modem. ' 9600 baud, no parity, 8 data bits, 1 stop bit. ' Read the entire buffer when Input is used. MSComm1.CommPort = CInt(cboCommPort.Text) If MSComm1.PortOpen = True Then MSComm1.PortOpen = False Wait for an OK indicating the modem is ready. Again, this string may be different for your modem. Open the port and send the attention string to your modem. You may need to change these parameters for your modem. Then set the port number and select 9600 baud, no parity, 8 data bits, 1 stop bit. Use the MSComm control to dial a phone number 'inefficient but if char-by-char events areVB Helper: HowTo: Use the MSComm control to dial a phone number RThreshold = 1 'Event for each character received. RThreshold = 0 'No events after receive completions. SThreshold = 0 'No events after send completions. Here's a minimal example where COM3/COM4 are the looped ports on my machine: Option Explicit I think you need to look a little harder at the documentation. If so, how can I do to get data from com1 port to com2port? Or any advice for anything! I screened form in the example and setting in com0com port, I don't have enought reputation to post image, so I upload this to flickr.īut when I try to run this example by type charracters in textbox1 and click button, nothing happen. In this example, I want User to type charracters in textbox1, then click command button, and charracters in textbox1 display in textbox2. I am new with vb6 and communication app, I try to run a example that transmitting and receiving data between two serial ports ( I install two serial ports by com0com soft).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |