Solved

MDI Child always maximized

Posted on 2006-11-06
3
380 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
  • 2
3 Comments
 
LVL 13

Accepted Solution

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

in there.
0
 
LVL 13

Expert Comment

by:newyuppie
Comment Utility
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
Comment Utility
>> 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now