.NET

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

MInimize and Maximize Windows Form

171 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 (171 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 (171 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 (171 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!