I have a form I use in 3 different MDI projects, so I created a DLL. Then I created an instance of the form on the ParentMDI form as follows.
I use the following code to show the form.
Before I created the DLL I had other forms referencing the Public Subs on frmToolChanger as follows.
Now frmToolChanger isn't publicly available anymore. So I have to further qualify the call to the sub as follows.
I've tried creating the frmToolChanger instance as "Public" and "Shared", but it's not available to the other child forms without referencing the ParentMDI. Is there a way to make it available without the additional reference?
VB.NET:
Public Class mdiWoodModeCNC
Public frmToolChanger As New ATC.frmToolChanger
I use the following code to show the form.
VB.NET:
CallPage(frmToolChanger)
VB.NET:
Public Sub CallPage(ByVal CallForm As Object)
CallForm.MdiParent = Me
CallForm.WindowState = FormWindowState.Maximized
CallForm.Show()
CallForm.BringToFront()
End Sub
Before I created the DLL I had other forms referencing the Public Subs on frmToolChanger as follows.
VB.NET:
Dim RB1 As Int16 = frmToolChanger.IOVariables("RB1")
Dim RB2 As Int16 = frmToolChanger.IOVariables("RB2")
Dim RB3 As Int16 = frmToolChanger.IOVariables("RB3")
Now frmToolChanger isn't publicly available anymore. So I have to further qualify the call to the sub as follows.
VB.NET:
Dim RB1 As Int16 = mdiWoodModeCNC.frmToolChanger.IOVariables("RB1")
Dim RB2 As Int16 = mdiWoodModeCNC.frmToolChanger.IOVariables("RB2")
Dim RB3 As Int16 = mdiWoodModeCNC.frmToolChanger.IOVariables("RB3")
I've tried creating the frmToolChanger instance as "Public" and "Shared", but it's not available to the other child forms without referencing the ParentMDI. Is there a way to make it available without the additional reference?