Prikazi cijelu temu 03.02.2015 18:48
roko Van mreze
Clan
Registrovan od:02.02.2009
Lokacija:Rijeka


Predmet:Re: VB.NET Cod vo VB6 Cod
A za tvoj primjer možeš i manje koda

dodaj si Microsoft Comm Control ana formu MSCOMM_neki

With MSCOMM_neki
.Handshaking = 2 - comRTS
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
' Leave all other settings as default values.
End With

Private Sub MSComm_neki _OnComm()
Dim InBuff As String

Select Case MSComm_neki .CommEvent
Case comEventBreak ' A Break was received.
Case comEventCDTO ' CD (RLSD) Timeout.
Case comEventCTSTO ' CTS Timeout.
Case comEventDSRTO ' DSR Timeout.
Case comEventFrame ' Framing Error.
Case comEventOverrun ' Data Lost.
Case comEventRxOver ' Receive buffer overflow.
Case comEventRxParity ' Parity Error.
Case comEventTxFull ' Transmit buffer full.
Case comEventDCB ' Unexpected error retrieving DCB]

' Events
Case comEvCD ' Change in the CD line.
Case comEvCTS ' Change in the CTS line.
Case comEvDSR ' Change in the DSR line.
Case comEvRing ' Change in the Ring Indicator.
Case comEvReceive ' Received RThreshold # of chars.
InBuff = MSComm_neki .Input
Call HandleInput(InBuff)
Case comEvSend ' There are SThreshold number of
' characters in the transmit buffer.
Case comEvEOF ' An EOF character was found in the
' input stream.
End Select

End Sub

Sub HandleInput(InBuff As String)

msgbox InBuff
End Sub

Provaj pa vidi što ti vrača dll pa napiši errors i Events