.NET

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

MInimize and Maximize Windows Form

172 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 (172 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 (172 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 (172 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.