473,851 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Loa d(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Dim objChild As frmMain = New frmMain()

objChild.Contro lBox = False

objChild.MdiPar ent = Me

objChild.Show()

End Sub

on the child form

Private Sub frmMain_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Me.ControlBox = False

End Sub

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

Get

Dim cp As CreateParams = MyBase.CreatePa rams

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 3077
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******** ********@TK2MSF TNGP11.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
3555
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 been unable to do this.The methods tried include : 1. Passing the MinimixeBox = False bit of code in the child form load method 2. Removing the control from design view.In the properties window 3. Passing MinimixeBox = False bit of code it in the...
1
4004
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 maximize the MDI child window, when I do this the title bar (with max, min buttons, etc..) for the child appears above my docked Panel. The desired effect is for the MDI child window to maximize with its title bar under the the docked panel on the...
5
4343
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 maximize too. An obvious thing to do is to handling the CLosing event and cancel it. Sadly, if you do this the main Form refuses to shut down... A solution to this is to intercept the Closing event on the main form and use it to set a boolean...
1
3079
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 to display the Mdi child form in all the Mdi parent form. The problem is that the Mdi child form seems to be minized in his parent ( The Mdi parent form ). I have to use the "Maximize" icon of the mdi child form to make it displayed in all the...
4
5029
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, maximize and mid size (don't know what to call it) button - however, neither the maximize or minimize buttons work - but the mid zise does! How can I turn it off? Thanks for any help. Bernie Yaeger
0
1286
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 non-client area (the part with the maximize/minimize buttons). It doesn't look right, is there a way I can make the form dock completely *below* the toolbar? TIA, Bob
0
486
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 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.
4
3702
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 student exam system. I don't want students to be able to copy from other windows. I have put a close button on the page in order to close the page. I have been searching though the website, all I can do now is to diable the maximize button, the...
4
2989
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 - Circle - Helix
0
1432
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. it shows in Normal Size. but shows the maximize state on the top right with the three button Minimize, restore and Close. I try to maximize it aftter it display, but still it gives same.. can anybody tell me how to solve this??
0
9898
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9748
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11020
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9506
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7907
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5934
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.