Public Enum mode
aaa = 1
bbb = 2
ccc = 3
End Enum
Private a As mode
Public Property Let test(value As mode)
a = value
End Property
Public Property Get test() As mode
test = a
End Property
Public Const comEvReceive = 2
Public Const comEventBreak = 1001
Public Const comEventCTSTO = 1002
Public Const comEventDSRTO = 1003
Public Const comEventFrame = 1004
Public Const comEventOverrun = 1006
Public Const comEventCDTO = 1007
Public Const comEventRxOver = 1008
Public Const comEventRxParity = 1009
Public Const comEventTxFull = 1010
Public Const comEventDCB = 1011
ユーザーコントロール
Public Enum Handshaking_mode
comNone
comXOnXoff
comRTS
comRTSXOnXOff
End Enum
Public Enum InputMode_mode
comInputModeText
comInputModeBinary
End Enum
Public Event OnComm()
Private Sub MSComm1_OnComm()
RaiseEvent OnComm
End Sub
Public Property Let CommPort(value As Integer)
MSComm1.CommPort = value
End Property
Public Property Get CommPort() As Integer
CommPort = MSComm1.CommPort
End Property
Public Property Let DTREnable(value As Boolean)
MSComm1.DTREnable = value
End Property
Public Property Get DTREnable() As Boolean
DTREnable = MSComm1.DTREnable
End Property
Public Property Let EOFEnable(value As Boolean)
MSComm1.EOFEnable = value
End Property
Public Property Get EOFEnable() As Boolean
EOFEnable = MSComm1.EOFEnable
End Property
Public Property Let Handshaking(value As Handshaking_mode)
MSComm1.Handshaking = CInt(value)
End Property
Public Property Get Handshaking() As Handshaking_mode
Handshaking = MSComm1.Handshaking
End Property
Public Property Let InBufferSize(value As Integer)
MSComm1.InBufferSize = value
End Property
Public Property Get InBufferSize() As Integer
InBufferSize = MSComm1.InBufferSize
End Property
Public Property Let InputLen(value As Integer)
MSComm1.InputLen = value
End Property
Public Property Get InputLen() As Integer
InputLen = MSComm1.InputLen
End Property
Public Property Let InputMode(value As InputMode_mode)
MSComm1.InputMode = CInt(value)
End Property
Public Property Get InputMode() As InputMode_mode
InputMode = MSComm1.InputMode
End Property
Public Property Let NullDiscard(value As Boolean)
MSComm1.NullDiscard = value
End Property
Public Property Get NullDiscard() As Boolean
NullDiscard = MSComm1.NullDiscard
End Property
Public Property Let OutBufferSize(value As Integer)
MSComm1.OutBufferSize = value
End Property
Public Property Get OutBufferSize() As Integer
OutBufferSize = MSComm1.OutBufferSize
End Property
Public Property Let ParityReplace(value As String)
MSComm1.ParityReplace = value
End Property
Public Property Get ParityReplace() As String
ParityReplace = MSComm1.ParityReplace
End Property
Public Property Let RThreshold(value As Integer)
MSComm1.RThreshold = value
End Property
Public Property Get RThreshold() As Integer
RThreshold = MSComm1.RThreshold
End Property
Public Property Let RTSEnable(value As Boolean)
MSComm1.RTSEnable = value
End Property
Public Property Get RTSEnable() As Boolean
RTSEnable = MSComm1.RTSEnable
End Property
Public Property Let Settings(value As String)
MSComm1.Settings = value
End Property
Public Property Get Settings() As String
Settings = MSComm1.Settings
End Property
Public Property Let SThreshold(value As Integer)
MSComm1.SThreshold = value
End Property
Public Property Get SThreshold() As Integer
SThreshold = MSComm1.SThreshold
End Property
Public Property Let PortOpen(value As Boolean)
MSComm1.PortOpen = value
End Property
Public Property Get PortOpen() As Boolean
PortOpen = MSComm1.PortOpen
End Property
Public Property Let Output(value As Variant)
MSComm1.Output = value
End Property
Public Property Get OutBufferCount() As Integer
OutBufferCount = MSComm1.OutBufferCount
End Property
Public Property Get CommEvent() As Integer
CommEvent = MSComm1.CommEvent
End Property
'Inputが識別子のため使えないっぽい
Public Property Get Input_() As Variant
Input_ = MSComm1.Input
End Property