Solved

MDI Child always maximized

Posted on 2006-11-06
3
382 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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Call an IPL program from vb.net and pass in a file location parmeter 2 21
Disable extension 8 38
VB.NET - Error - Object not set in Module 4 33
get row value in vb.net 4 14
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

778 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