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 9 3062
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
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
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
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
Bill,
So why not do what I wrote?
Although in normal situations the closing of a child form should not close
the application.
Cor
Bill,
So why not do what I wrote?
Although in normal situations the closing of a child form should not close
the application.
Cor
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
Bill,
Show some code how you show the child form, maybe we can help you then now
it is to much guessing?
Cor
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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...
|
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...
|
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
| |
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
|
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.
|
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...
|
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
|
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??
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |