473,667 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Load an MDI child maximized...

VB2005 / XP SP2

Hi all,
I'm just a newbie in VB.Net and I created an MDI container form, with a menu
and when I choose something from the menu, it should load the MDI child form
maximized.

To achieve this I set the WindowState property of the child to 'Maximized'
and use the following code to display the form:

frmPatient.MdiP arent = Me
frmPatient.Show ()

The window loads not maximized in the MDI container, but as soon as I resize
or move the MDI Container the Child form maximizes. Do I need to repaint or
something?

Tia,
Martin

Jan 17 '06 #1
1 3000
Try putting the code in the Load event of the Child form
hth,
Shmuel

"Martin" <x@y.com> wrote in message
news:u7******** ******@TK2MSFTN GP15.phx.gbl...
VB2005 / XP SP2

Hi all,
I'm just a newbie in VB.Net and I created an MDI container form, with a
menu and when I choose something from the menu, it should load the MDI
child form maximized.

To achieve this I set the WindowState property of the child to 'Maximized'
and use the following code to display the form:

frmPatient.MdiP arent = Me
frmPatient.Show ()

The window loads not maximized in the MDI container, but as soon as I
resize or move the MDI Container the Child form maximizes. Do I need to
repaint or something?

Tia,
Martin


Jan 17 '06 #2

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

Similar topics

3
5610
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent window. I have set all my child windows to be WindowState.Maximized but after showing 2 or 3 windows, the windows all drop back to Normal state. I have tried various things to overcome this inclusing overriding OnResize etc but none seem to give...
9
7921
by: Jason | last post by:
I have one MDI Child form for a MDI Parent form. I want the MDI Child form to not have a control box for minimizing and and closing the form. I set the control box property of the child to false. When I run the form, the minimize and and restore buttons are enabled, but the close button is disabled. Why is that? How can I just show the MDI Child form so that the minimize, restore and close buttons do not show? Thanks
7
3100
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form as follows: Friend F0 As frmMain Friend F1 As frmStart Friend F2 As frmSearch Then in my ShowPage routine (which is passed a string "pageToShow" which is the name of the form I wish to open), I first check to see if we already have an instance...
3
6323
by: Tom | last post by:
I am having a serious issue with my MDI child windows. This is with a large VB.NET application that I ported over to VS 2005 from VS 2003. The problem is that, if the child window is maximized and then closed, it produces the following error message: Cannot access a disposed object Object name:'icon' in source System.Drawing And then the whole system crashes. Again, this ONLY occurs if the MDI child window is maximized within the MDI...
1
15120
by: Brett Romero | last post by:
I set an MDI child form to Windowstate=maximized at design time. When I new up and show the child form in the MDI parent, the child's title is hidden since it's pushed to far up (below parent tool bar). On the MDI parent, the resize icon is displayed in the top right. That means the child is maximized right? What doesn't it fill the parent container area? When I click the resize icon, the child then jumps to the parent center and...
3
2207
by: =?Utf-8?B?Sm9l?= | last post by:
Can anyone tell me if this is a confimed bug and if there is a workaround: - Create an form set as an mdi container - Add a Menustrip to mdi container and set form's MainMenuStrip property to newly created menu - Create mdi child form and set it's window state to Maximized When you run the project and open the child form, the menus are merged properly, but the form appears the same size as it does at design time (rather than...
6
5971
by: Doc John | last post by:
Assuming I have several child Forms open (not maximized) in my MDI Form, when I maximize any of them and then close it, all my other Forms automatically maximize. How come? Is there an easy solution for this? Thanks. VS2005 - Windows Forms
4
13603
by: Jassim Rahma | last post by:
how can I maximize the MDI child in the free MDI parent area not in the whole window.. I mean in the (whole window area - menubar - tool bar) so i want the MDi child to show its whole window and caption bar within the MDI container.
6
4244
SpeedJunkie
by: SpeedJunkie | last post by:
Hi, I have 2 child forms. User can maximize one child form and he's not allowed to maximize the second child form. Now i am facing a problem, when one child form is already open and is in maximized state the form which user is not allowed to maximized is also getting opened in maximized state. I have tried opening the 2nd form by setting the form window state to normal but to no avail.
0
8457
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
8365
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
8883
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
8788
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...
1
8563
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,...
0
8646
tracyyun
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...
0
7390
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...
0
5675
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();...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.