MScomm doesn't work on non-vb computer - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17

Thread: MScomm doesn't work on non-vb computer

  1. #16
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,786

    Re: MScomm doesn't work on non-vb computer

    The first step would be to place a break point in the on comm event near the top and then run the code in the IDE and send it some data. It should hit the breakpoint and from there you can step through the code.
    If you can not reproduce the problem on the PC where VB is installed then I would suggest adding some code to write to a log file and key points including various points in the oncomm event then inspect the log file to see what may be going on on the troublesome pc.


    The code you have shown looks like once it gets the on comm event will not break out of the loop and actually receive any data until the buffer holds about 8k characters. This is a bit unusual and I am not sure exactly how that would work out when it is in a tight loop while data is coming in. setting the break point and stepping through the code should shed some light.

    Definitely do not upgrade the project to VB.Net, If you want it in VB.Net then you should rewrite it in VB.Net and use the Serial Port Class rather than the MSComm control.

    I have used the MScomm control in several VB6 projects and have not had any issues with getting it to work properly.
    Always use [code][/code] tags when posting code.

  2. #17
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,875

    Re: MScomm doesn't work on non-vb computer

    You won't get anything to work using the upgrade assistant. You have to read every comment, and then look at the samples to see how to do that in .Net (which is probably the wrong way to start it). Pick a language, and start from there. VS2012 is current
    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!

Page 2 of 2 FirstFirst 12

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center