473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Parent child close minimize maximize

Hi

I have a parent child forms. I want the close, maximize, and minimize
buttons to be removed.
One the child form I have set the maximize and minimize buttons to false. I
have the child form mamiximze in the parent form. So then the maximized
button is still active. But I want the child form to fill the parent form
without the ability to close minimize or maximize the form like a default
page.

The buttons are removed when the child form is not maximized.

Thanks in advance

Bill
This is the parent form Load
Private Sub frmContainC_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim objChild As frmMain = New frmMain()

objChild.ControlBox = False

objChild.MdiParent = Me

objChild.Show()

End Sub

on the child form

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Me.ControlBox = False

End Sub

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams

Get

Dim cp As CreateParams = MyBase.CreateParams

Const CS_DBLCLKS As Integer = &H8

Const CS_NOCLOSE As Integer = &H200

cp.ClassStyle = CS_DBLCLKS Or CS_NOCLOSE

Return cp

End Get

End Property


Nov 21 '05 #1
9 3030
Bill,

That is the controlbox = false, however you have than direct as well to add
a cancel button on your form because that is in that as well.

Cor
Nov 21 '05 #2
Bill,

That is the controlbox = false, however you have than direct as well to add
a cancel button on your form because that is in that as well.

Cor
Nov 21 '05 #3
Cor

Wahat I am trying to accompish is a Main form which the user will have to
click on the parent window to close the program. Because I don't want an
empty parent window

Bill
Nov 21 '05 #4
Cor

Wahat I am trying to accompish is a Main form which the user will have to
click on the parent window to close the program. Because I don't want an
empty parent window

Bill
Nov 21 '05 #5
Bill,

So why not do what I wrote?

Although in normal situations the closing of a child form should not close
the application.

Cor
Nov 21 '05 #6
Bill,

So why not do what I wrote?

Although in normal situations the closing of a child form should not close
the application.

Cor
Nov 21 '05 #7
Cor
I did put controlbox = false, but if the windowstate = maximized then the
maximized button is still available until it goes back to the normal window
size and then it it doesnt fit the window.

I was not wanting the child form to close the window I was wanting the
child form to stay open till the parent form is closed.

Bill
"Cor Ligthert" <no************@planet.nl> wrote in message
news:O0****************@TK2MSFTNGP11.phx.gbl...
Bill,

So why not do what I wrote?

Although in normal situations the closing of a child form should not close
the application.

Cor

Nov 21 '05 #8
Bill,

Show some code how you show the child form, maybe we can help you then now
it is to much guessing?

Cor
Nov 21 '05 #9
Hi Cor

I was able to get it to work. I rebuilt the form and did not set any of the
setting in the form design just set the items in the code and it worked for
my purpose

Thanks
Bill
Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Manoj | last post by:
Hi All, We have an VB.net application which has 31 projects in one solution.In this we want to disable the Maximize and minimize buttons of the child forms as they load in the main MDI.We have...
1
by: JDeats | last post by:
I have a WinForm that is set as an MDIContainer, I have an Panel on this form that has it's docking property set to "Top". When a spawn an MDI childform inside my parent all is well untill I...
5
by: Iain | last post by:
I would like to prevent the user from closing MDI child windows. However, I would like them to be able to minimize and maximize them. Setting the Control Box to false removes the minimize and...
1
by: Sylvain | last post by:
Hi, I am developping a Visual C++ application. In my application, I created a Mdi parent form with a main menu. I also created a "menuItem" click to display a Mdi child form. I want in this case...
4
by: Bernie Yaeger | last post by:
I'm opening an mdi child form maximized. I've set the controlbox to false, the maximize button to false, the minimize button to false. Nevertheless, when the child form opens, it has a minimize,...
0
by: Bob | last post by:
I have my own toolbar docked at the top of an MDI parent form's client area. When a child form is maximized, the toolbar gets bumped down underneath an area that shows the child form's topmost...
0
by: Bill | last post by:
Hi I have a parent child forms. I want the close, maximize, and minimize buttons to be removed. One the child form I have set the maximize and minimize buttons to false. I have the child form...
4
by: Linda | last post by:
My environment is Windows Server 2003, .NET Visual Studio Academic 2003, ASP.NET. I need to create a page with no top title bar, no mimize button, no maximize button, no close button. It is for a...
4
by: psbasha | last post by:
I would like to create a Parent and Child Dialog in Tkinter. Parent Dialog will be having have the Combo Box with Geometry Selection Parent Dialog : ------------------- - Point - Line -...
0
by: phpfreak2007 | last post by:
Hello all,,, I have created one Application. there are one MDI form and One child.. Initially i set the Window state for both of them to Maximized.. but when i display child form....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.