Remarks:
When using MSComm32 in Visual Basic 6 it was quite common to use the numerical values 0=comNone, 1=comXOnXoff, 2=comRTS, 3=comRTSXonXoff instead of the constant names.
Those numerical values continue to work in VB.Net where MSComm32 and SComm64 have the same syntax.
But, if using the constant names in VB then the whole 'namespace.enum.constantname' should be used.
C# projects must always use the HandshakeConstants.ConstantName syntax. eg. SComm1.Handshaking = SCommLib.HandshakeConstants.comXonXoff
When reading the property the same syntax is used although the result can be safely cast to/from a number if necessary. |