[mono-vb] Serial port PinChanged handle (Vb Win to Linux)

Fábio Braglin fabiobraglin at gmail.com
Fri Jun 20 12:37:48 UTC 2014


I have a simple application in vb that check the SerialPort (previously
choosed) and wait for a Dsr pin change.

This code works in Windows, but not in Ubuntu 14, doesn't shows any error
message, I'm using a Serial-USB adapter, so, I can see that the Serial port
is open because de data LED is blinking, but nothing happens when the
external signal arrive!

* Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
*        With SerialPort1*
*            If .IsOpen = True Then .Close()*
*            .PortName = ComboBox1.SelectedItem*
*            .DtrEnable = True*
*            .RtsEnable = True*
*            .Open()*
*        End With*
*        Timer1.Enabled = True*
*    End Sub*
*  Private Sub com_PinChanged(sender As Object, e As
System.IO.Ports.SerialPinChangedEventArgs) Handles SerialPort1.PinChanged*
*        Try*
*            If IO.Ports.SerialPinChange.DsrChanged Then*
*                Panel1.BackColor = Color.YellowGreen*
*            End If*
*        Catch ex As Exception*
* Msgbox(ex.message)*
*        End Try*
*    End Sub*

The Pinchanged handle for mono need to be different in linux?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-vb/attachments/20140620/40b4cc1b/attachment.html>

More information about the Mono-vb mailing list