?
Solved

communicate with mscomms

Posted on 2003-03-05
13
Medium Priority
?
403 Views
Last Modified: 2010-05-01
I am doing this telephone system, but i need to communicate with msComms. Unfortunately, i am not that familiar with ms comms nor how to connect to it. i did download the mscomms32.ocx file but i dunno wot to do next....all i know is that i need a serial port (rs232) and a modem +phone+phoneline to test it...but to code up to mscomms i dunno.  is there some1 who can send me a sample of such code?or explain how?
thanking you so much
regards Naomi
0
Comment
Question by:grimaenriqueznaomi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 8076947
See the following link for excellent code example on MSComm control. Also if you have access to MSDN you will all the documentation there.

http://www.freevbcode.com/ShowCode.Asp?ID=2236
0
 

Author Comment

by:grimaenriqueznaomi
ID: 8078933
is there an english site where i can see the example or not pls....10x so much
Naomi
0
 
LVL 18

Accepted Solution

by:
Sethi earned 80 total points
ID: 8079074
I have given a link to an english site. You can also go to msdn.microsft.com and search for MSComm. You will get plently of material there.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:grimaenriqueznaomi
ID: 8079550
okie i thank u lots
regards Naomi
0
 

Assisted Solution

by:dwalfisch
dwalfisch earned 80 total points
ID: 8081318
Dear Naomi,

What you want to do is not dificult, you just have to do the following:

1) Add an MsComm control in a form, and name it for example mscX.
2) View its properties, and change the Commport (you can do it in run time if you prefer), specifying the Serial Port where the modem is.
3) In run time, you first must open the port, using the property PortOpen and setting it to True.
4) Then, using the Comm Control property Output, you must assign what you want to send to the modem to configure or to execute. To do it, you should learn the AT commands, which are the commands the modems accept. For example, "AT L3" means put volume at maximun level. To dial, you must output "AT D ###", where ### is the number, etc.
5) You will receive the answer, in an event (mscX_OnComm). There, you should verify what the event is (see property CommEvent), and if it a response, you can use it consulting the property Input.
6) After the modem connects to the other, you can send info as if there would be a direct link.
7) You have a command to disconnect modem, I think it was +++, but I'm not sure...

I don't have a modem at hand... I prepared an example, but can't probe it right now... but if you want to test it, let me know and I will send it to you.

See you.
0
 

Author Comment

by:grimaenriqueznaomi
ID: 8110118
Dwalfisch

i thank you for your comment....i did find an at comand site....but by anychance since im pretty new to vb have u got a sample of mscomms?

thankz
Naomi
0
 

Author Comment

by:grimaenriqueznaomi
ID: 8211269
yeah basically my problem is that the pc has to record the data, it will just need to print it on screen! i did select the com port and the baud rate etc.....but i dont know how to continue! this is what i did...
Private Sub mscomx_OnComm()


If mscomx.CommEvent = comEvReceive Then
buff = buff & mscomx.Input

If Right(buff, 3) = Chr(13) & Chr(13) & Chr(13) Then

'If buff = comPortOpen Then
'mscomx.InBufferCount

If connection = True Then
mscomx.Input

End If
End If
End Sub

Private Sub connecting()
mscomx.InBufferCount = 0
receive = comEvReceive
connection = True
End Sub
0
 

Expert Comment

by:CleanupPing
ID: 8900630
grimaenriqueznaomi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 18

Expert Comment

by:Sethi
ID: 8910948
Recommendation: Split points between dwalfisch & Sethi
0
 

Expert Comment

by:CleanupPing
ID: 9056533
grimaenriqueznaomi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9061435
Recommendation: Split points between dwalfisch & Sethi
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9073982
Moderator, my recommended disposition is:

    Split points between: Sethi and dwalfisch
    *** Thanks Sethi.   Sorry about the deja vu!

DanRollins -- EE database cleanup volunteer
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9075913
;-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question