Question To restore the child windows from windows menu

Indumathy

New member
Joined
Mar 20, 2018
Messages
3
Programming Experience
1-3


To restore the child windows from windows menu when clicked below the ArrangeIcons MdiList in VB.Net.

    Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
        If Me.WindowState = FormWindowState.Normal And sysShowWindowsTaskBar = 0 Then 
            Me.WindowState = FormWindowState.Maximized
        End If
    End Sub

In mainform load :
            If sysShowWindowsTaskBar = 1 Then 
                Me.WindowState = FormWindowState.Normal
                Me.Height = Screen.PrimaryScreen.WorkingArea.Height
                Me.Width = Screen.PrimaryScreen.WorkingArea.Width
                Me.Location = Screen.PrimaryScreen.WorkingArea.Location
            Else
                Me.WindowState = FormWindowState.Maximized
            End If



But the minimized form on the parent form not restoring on clicking it from the ArrangeIcons

Please give me a solution ASAP.
Thank all in advance.
 
The first code snippet doesn't make any reference to minimised forms and, according to your description, the second code snippet is only executed when the main form is first opened, so why would you expect any minimised forms to do anything as a result?

I have a strong suspicion that you haven't done any debugging of that code, so that's what you should do now and do before posting in future. Set breakpoints at the appropriate places (at the top of each of those code snippets would qualify) and then step through the code line by line. Before each step, ask yourself exactly what you're trying to achieve with the next line and exactly what you expect to happen. After each step, check whether what you expected to happen actually did happen. If your description of the problem is accurate then I would expect that execution won't step into the If block of the first code snippet and the breakpoint on the second snippet won't even be hit when you expect it to. Both those should be dead giveaways of issues and, even if you still can't fix them yourself, at least you can provide us with far more relevant information.
 
Private Sub mnuWindowsArrangeIcons_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuWindowsArrangeIcons.Click
Me.LayoutMdi(MdiLayout.ArrangeIcons)

Dim fd As New OpenFileDialog()
fd.DefaultExt = "*.*"
fd.ShowDialog()

End Sub

Yeah i understood . with the code i mentioned may not performany action to the minimied form
so can you please suggest whether the above code will work to RESTORE on clicking from the WINDOWS MENU LIST
 

Latest posts

Back
Top