CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Newbie with a Com question

    I hope I'm posting this in the right place. If not please direct me to the place I should post this question. I'm new to VB6, but I do know basic programming. I'm trying something that I have never done before and need a place to start.

    I purchased this elect monitoring device (Current Cost) and it's mostly web based. Don't need to broadcast my elect useage all day long to the world. I have looked on line for a desktop app and can't find one. Therefore, I guess I should (I hope) make one myself. With all this in mind, how does one start off in reading the device from the comm port? I do have VB6 Pro installed on my computer.

    Again, I thank all those that have answer.

    Timlab

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Newbie with a Com question

    You can start with a link to the product, then look for documentation describing the characteristics of the device, and how to access it. Without that, it will be extremely hard to figure out.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Newbie with a Com question

    You start by adding a MSComm control to your form then setting the port settings and writing code to handle the data as it arrives but you first should know what data you are going to be getting and how it is formatted.

    There are lots of samples online for working with MSComm control, a search would shed some light.
    Always use [code][/code] tags when posting code.

  4. #4

    Re: Newbie with a Com question

    Aren't you using .NET - it offers so much abstraction that you only need to concentrate on your logic. As the above user said, the port that broadcasts the data or the incoming one - can always be read and manipulated. Writing in C# would be easier for you. If you need help, feel free to post your updates here.


    http://savensearch.blogspot.com/

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Newbie with a Com question

    What makes you think that writing in C# would be easier for this poster? It appears there is some knowledge of Basic from the OP but no hint of any C# knowledge or other C style language.

    It is very easy to work with Serial Input in VB6, actually quite a bit easier than in VB.Net or C#
    Always use [code][/code] tags when posting code.

  6. #6

    Re: Newbie with a Com question

    Ah ok - C# would be easier for me - thought VB is no longer supported and has been replaced with .NEt languages.

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Newbie with a Com question

    VB.Net is the replacement/upgrade for VB6. Next forum down
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured