Get a value from VB.net TextBox in Arduino

In VB.net there's a serial port class. Initialize an instance of it with the correct parameters and you can send data to Arduino.

On the Arduino side you use the serial.available() and serial.read() functions.

This is (part of) the vb.net code i use to open a serial port.

Imports System.IO

Dim WithEvents serialPort As New IO.Ports.SerialPort

Public Sub serialPortOpen()

        'Configure and open the serial port

        'If the port is already open, close it first
        If serialPort.IsOpen Then
            serialPort.Close()
        End If

        Try
            With serialPort
                .PortName = "your serial port goes here i.e com2 or whatever"
                .BaudRate =9600 'must match what you setup in your arduino code
                .Encoding = System.Text.Encoding.ASCII
                .NewLine = Chr(13) + Chr(10)
            End With

            'Open the port and clear any junck in the input buffer
            serialPort.Open()
            serialPort.DiscardInBuffer()
        Catch Ex As Exception
              'handle any errors here
        End Try
End Sub

If you are only going to send data frm VB to Arduino i think you can skip "withevents" in port declaration, but if you want to use for instance the serialport.ondatarecieved event it must be there.