-
May 4th, 2013, 10:51 PM
#16
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.
-
May 4th, 2013, 11:20 PM
#17
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|