I have been using SComm32 with VB6 with no problems. Now I am trying to use it on my new laptop with Win10 and using VB Net through Visual Studio 2008. I added the component to the toolbox. But when I use the scomm32 control it is not loading the correct properties and it is not working.
Posted on: Jun 17 2017 at 12:36:47 PM
It wasn't specifically designed for .Net. But it still works.
.Net exposes the get and set syntax and the properties work more like functions. So. In VB.Net you can do this:
If SComm1.get_PortOpen = False then
' See that each Property/method name is prefixed with get_ or set_ and when setting a property the new value is passed in brackets just like a function call.
But. For .Net you should consider using Comm64
That is a proper .Net DLL which has the same syntax as MSComm32. Don't be confused by the name '64' it is an 'AnyCPU' assembly so will work in 32bit, 64bit and AnyCPU projects. The default download on the comm64 website is for FW4 and above. If you're using Framework 2 or 3.5 then lookout for the previous version. It's there on the site just not immediately obvious
Posted on: Jun 17 2017 at 09:12:27 PM
I have downloaded Comm64 for VS2008. When I try to open the port it gives me runtime error 8002 (Com port could not be opened).
Some more details, I have the COMM control on form1. I do access the COMM control from forms 1 & 2.If I access the port from form1 and then go to form2 I get the error above and vice versa if if I access the port from form2 and then go to form1 I get the error above.
Posted on: Jun 18 2017 at 04:00:34 PM
Problem turned out to be VB Net code issues that I had to fix guided by the sample project supplied with the download .
Reply - add a comment to this topic.
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected.