How do I include a module from a project in a multi-project solution?

16 Views Asked by At

The solution looks like this; enter image description here

The error looks like this enter image description here

The error occurs on the call to open a serial port in the AxisPosition project.

     `Private Sub btnOpenSerialPort_Click(sender As Object, e As EventArgs) Handles btnOpenSerialPort.Click
    Try
        If MyCOMPort.IsOpen() Then
            MyCOMPort.DiscardInBuffer()
            MyCOMPort.Close()
            MessageBox.Show("MyCOMPort was Open and is now Closed")
            txtbxSerialPort.BackColor = Color.Red
            txtbxSerialPort.Text = MyCOMPort.PortName & " Not Open"
        Else
            'Open the appropriate serial port
            OpenSerialPort(MyCOMPort)
            'Notify User port is open or not.
            'Intialize any variables.
        End If
    Catch typeinitializationexception As Exception
        MessageBox.Show("Type error:   " & typeinitializationexception.Message)
        If typeinitializationexception.InnerException IsNot Nothing Then
            MessageBox.Show("Inner Exception:   " & typeinitializationexception.InnerException.Message)
        End If
    Catch ex As Exception
        MessageBox.Show("Exit:   " & ex.Message)
    End Try

The com port is declared in AxisPosition. ' Public WithEvents MyCOMPort As SerialPort = New SerialPort'

Acquire is the start-up form, and ManipulatorControl is listed as a reference and contains AxisPosition. How do I get access to all the projects and their components in the solution?

0

There are 0 best solutions below