We help IT Professionals succeed at work.
Get Started

Minimize forms within MenuForm and not multiple forms on Windows Start Bar

TSFLLC
TSFLLC asked
on
187 Views
Last Modified: 2012-05-06
I have two or more forms that can be opened at the same time directly from my menu.  The forms, when minimized stay within the borders of my MainMenu form.

However, one of these forms has a button where I want to load another form, BUT NOT with .ShowDialog.  Or at least not where other forms that are open can't be activated.  I want all three forms to be free-wheeling and minimize without creating another minimized button on the start bar.

How would I open the 3rd form to create this type of situation?
From MainMenu....
 
Loading 1st Form
    Private Sub TruckStatus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuTruckStatus.Click
        If myFormsList.ContainsKey(1000) Then
            Dim frm As Form = DirectCast(myFormsList(1000), Form)
            Misc_BrowseFormStatus.RefreshBrowseFormStatusGrid.Invoke()
            frm.Activate()
            frm.WindowState = FormWindowState.Normal
        Else
            Dim frm As Form = Misc_BrowseFormStatus.Instance
            myFormsList.Add(1000, frm)
            frm.MdiParent = Me
            frm.Show()
        End If
    End Sub
 
Loading 2nd Form
    Private Sub mnuLoadMgmt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuLoadMgmt.Click
        If myFormsList.ContainsKey(2) Then
            Dim frm As Form = DirectCast(myFormsList(2), Form)
            Main_LoadMgmt.ReActivateLoadEntryForm.Invoke()
            frm.Activate()
            frm.WindowState = FormWindowState.Normal
        Else
            glNewLoad = True
            Dim frm As Form = Main_LoadMgmt.Instance
            myFormsList.Add(2, frm)
            frm.MdiParent = Me
            frm.Show()
        End If
    End Sub
 
Loading 3rd Form from inside 2nd Form
    Private Sub bBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bBrowse.Click
            glTable = "truck_loads"
            If myFormsList.ContainsKey(2001) Then
                Dim frm As Form = DirectCast(myFormsList(2001), Form)
                frm.Activate()
                frm.WindowState = FormWindowState.Normal
            Else
                Dim frm As Form = Misc_BrowseForm.Instance(dvGlobalLoads.Sort)
                myFormsList.Add(2001, frm)
                frm.Show()      ????? Here's the problem
            End If
        End If
    End Sub

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE