Forms Covering Owner Form Topbar

jothousand

New member
Joined
Jan 29, 2012
Messages
3
Programming Experience
1-3
Hi,

I have a main form that stays in the background of my program. Other windows open and are owned by the main form. Think of it as your desktop.

It's not a MDI form; I can't use a MDI form for this project because it doesn't work for my project. My main form is used as a workspace, almost like the desktop. And also my forms have custom borders, and using a MDI form with my borderless forms cause focus issues.

The main form has a bar at the top, but when other windows are maximized, the bar is covered. If it helps, the bar at the top is a user control.

How do I keep this from happening?

Thanks!
 
Working out the MDI issues is probably a better option, but you may be able achieve a result by handling WM_GETMINMAXINFO message.
 
RE: JohnH

Working out the MDI issues is probably a better option, but you may be able achieve a result by handling WM_GETMINMAXINFO message.
OK. Thank you! I think I'll just switch over to the MDI form then. I should be able to fix all the problems in a short amount of time I guess.Do you know how I could keep the MDI form from showing the open windows at the bottom? That was one of my problems with it. I have a custom toolbar that creates buttons with the titles of all the open forms.
 
If you don't want windows to minimize you can set MinimizeBox to False, and let user close window.
If you're implementing your own minimized windows manager you can hide the window when it minimizes; using Resize event, WindowState property and Hide method.
 
VB.NET:
    Private Sub Form1_ResizeEnd(sender As Object, e As System.EventArgs) Handles Me.ResizeEnd
        Dim refForm As Form = sender
        If refForm.WindowState = FormWindowState.Minimized Then Me.Visible = False
    End Sub

Should do it...
 
Back
Top