Solved

MDI Child always maximized

Posted on 2006-11-06
3
385 Views
Last Modified: 2008-02-01
I want an MDI child to appear as maximised. Here is what I do:

    Private Sub frmList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.WindowState = FormWindowState.Maximized
    End Sub

Now, I want to prevent the user from restoring it to normal size. How can I do that?
0
Comment
Question by:huji
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 125 total points
ID: 17882858
try handling the Form Resize event and put the same code
Me.WindowState = FormWindowState.Maximized

in there.
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17882870
or set the form border to Fixed and user will not be able to resize it. you could also dissapear the minimize and restore buttons via the properties in the design time of the form
0
 
LVL 14

Author Comment

by:huji
ID: 17882946
>> you could also dissapear the minimize and restore buttons via the properties in the design time of the form
This makes the maximize button of  a normal sized form to disappear, but doesn't make the "restore" button of a maximized for to disappear!!

>> set the form border to Fixed
That didn't herlp either!!

>>try handling the Form Resize event and put the same code
Me.WindowState = FormWindowState.Maximized

I need to maximize the form in the beginning. I do it in the Load even handler. Using the same sub to handle Resize made the Load not to function properly about maximizing the form. However, setting up a different handler made the trick.

Thanks
Huji
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question