Results 1 to 2 of 2

Thread: Super Noob MSCOMM question.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    26

    Super Noob MSCOMM question.

    I would like to have a couple of buttons on a form that upon release will send a command over the serial connection to a piece of home theater equipment.

    a) will i need to have a seperate instance of the mscomm on the form for each device i want to control (assuming they are seperate ports)?

    b) could someone please help me with a snipet of code that would do this? I dont believe the device will be responding.

    2A647476300D0A is the command that wish to send.
    Thanks very much for your help.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Super Noob MSCOMM question.

    a) You can open the port, send the data, close the port, then open a different port, etc.

    b) Look in the help file. You can use the code in the example just as it is - it works. Just use a string containing "2A647476300D0A" as the data you're sending.

    Set up all the ports on Form_Activate, and send the data on <your button name>_Click.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width