Windows Develop Bookmark and Share   
 index > Windows Forms General > Windows Child Form Control Box
 

Windows Child Form Control Box

Hi,

        I have created an MDI form in VS 2008 and created a child form also.

I made all the properties related with MaximizeBox, MinimizeBox and ControlBox false, but I get all those functionalities and icons at the corners of the child form.

I just need your help to create the child form without the Minimize, Maximize and even close.

Thanks in advance.
Gna Andrew Cross  Monday, October 05, 2009 4:51 AM
If you set the above properties (ControlBox to false) then it will not show at runtime.. you may be setting it back to true somewhere in your code.
:: Learning .NET ::
Prasant Swain  Monday, October 05, 2009 5:33 AM
Just load a new dummy MenuStrip to the ParentForm.


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.IsMdiContainer = True
        Me.MainMenuStrip = New MenuStrip
        Dim ChildForm As New Form2
        ChildForm.WindowState = FormWindowState.Maximized
        ChildForm.MdiParent = Me
        ChildForm.Show()
    End Sub

VB.NET to C# http://www.developerfusion.com/tools/convert/vb-to-csharp/
Se3ker385  Monday, October 05, 2009 7:23 AM
If you set the above properties (ControlBox to false) then it will not show at runtime.. you may be setting it back to true somewhere in your code.
:: Learning .NET ::
Prasant Swain  Monday, October 05, 2009 5:33 AM
Just load a new dummy MenuStrip to the ParentForm.


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.IsMdiContainer = True
        Me.MainMenuStrip = New MenuStrip
        Dim ChildForm As New Form2
        ChildForm.WindowState = FormWindowState.Maximized
        ChildForm.MdiParent = Me
        ChildForm.Show()
    End Sub

VB.NET to C# http://www.developerfusion.com/tools/convert/vb-to-csharp/
Se3ker385  Monday, October 05, 2009 7:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Exception handling and the backgroundworker
• Print PDF with PrintDocument Control
• Raise an event from the IE Browser Control?
• Multiple custom controls within controls: How to optimize rendering?
• Evaluate an algabraic string expression like "5 +5"
• Losing shortcut keys and ability to tab round a form's controls.
• photo saving
• Object reference
• Quick question on hotkeys
• pictureBox