Hi guys
I'm porting a program from vb6 and it used the old MSComm class to do some serial communication. As some of you know, when ActiveX controls are upgraded there's a prefix "Ax-" added to the class name. So now in the Main Menu. Designer.vb the definition for the serial comm control becomes:
Public WithEvents MSComm1 As AxMSCommLib.AxMSComm
later I'm having some errors (Exception from HRESULT: 0x800A017C (CTL_E_INVALIDPROPERTYVALUE)) on the line
frmMainMenu.MSComm1.Output = Chr(FrameSize)
which I believe there's something wrong with the type of the right side of the equation. but that's not my biggest concern now.
I'm just wondering, can I replace this interop AxMSComm with the MSComm which I saw in the Object Browser in VB08? Will that get rid of the whole interop deal?
I guess my last resort is to use System.IO.Ports.SerialPort to do the serial communication, which is the .net way, which means I need to get rid of the Interop and a lot of rewrites..
Any ideas appreciated
--------------
ok.. I think between figuring out a way to wrestle with the interop and rewriting the code using IO.Ports.Serialport , i'd have to choose