.NET

Reply
Active Contributor
basha_sk312
Posts: 32
Registered: ‎01-23-2006
Message 1 of 4 (170 Views)

MInimize and Maximize Windows Form

170 Views, 3 Replies
10-05-2006 12:11 AM
Hi All,
How can we minimize a windows form when we are in selection mode. I want to maximize that form after the selection.
Thanks in Advance.

Regards,
Basha
*tp
Message 2 of 4 (170 Views)

Re: MInimize and Maximize Windows Form

10-05-2006 04:46 AM in reply to: basha_sk312
' Before selection
Me.Hide()

' After selection
Me.Show()



escreveu na mensagem
news:5351303@discussion.autodesk.com...
Hi All,
How can we minimize a windows form when we are in selection
mode.
I want to maximize that form after the selection.
Thanks in Advance.

Regards,
Basha



I'm protected by SpamBrave
http://www.spambrave.com/
Active Contributor
basha_sk312
Posts: 32
Registered: ‎01-23-2006
Message 3 of 4 (170 Views)

Re: MInimize and Maximize Windows Form

10-07-2006 01:53 AM in reply to: basha_sk312
Hi,
I have used this before selection
Form1.ActiveForm.WindowState = FormWindowState.Minimized;

and after selection
Form1.ActiveForm.WindowState = FormWindowState.Maximized;

The problem is, the Form is minimizing properly but at the point of Maximizing it is showing an error like "Object reference is not set to an instance of an object". Hope someone can help me.

Regards,
Basha
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 4 of 4 (170 Views)

Re: MInimize and Maximize Windows Form

10-08-2006 11:34 AM in reply to: basha_sk312
Basha,

The problem is when you set the window state of the active form for form1. When you do this, there is no active form in the property Form1.ActiveForm. Did you try TP's answer? His solution should work for you.

C
Announcements
Autodesk Alert | We are currently working on restoring Previous Version License request access in the Autodesk Subscription Center. If you are a subscription customer and would like to request a Previous Version License, please use this link as a temporary workaround. We apologize for the inconvenience and thank you for your patience.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.