Including c# program as a reference in a VB.NET app
Hi - I have a VB.NET app that reads a Vectornav GPS/IMU thru a USB port. The VB.Net program has been stable for several years, but has very sparse random failures where the heading data starts spinning. Vectornav has released a new SDK that includes a sample C# program that has access to many internal device registers and provides objects that may allow me to finally diagnose the root cause of these events.
I have set the C# app as a reference in my VB project, and can see the objects . . BUT
when I start a debug session with no change to the VB.Net code, the C# app starts, instead of the code in my Form1 Class.
Copilot diagnosed the problem being in the Application.Designer.vb where
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.WindowsApplication1.Form1
End Sub
needed to be
Me.MainForm = Global.GPS_IMU_Reader.Form1
There is a caution not to change the code in the application.designer.vb (and in fact the change to the code generates an error) but to make the change in the Project.GPS_Reader Properties application window.
This window is greyed-out - I have attached a screenshot of this page.