.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MInimize and Maximize Windows Form

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
329 Views, 3 Replies

MInimize and Maximize Windows Form

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
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

' 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/
Message 3 of 4
Anonymous
in reply to: Anonymous

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
Message 4 of 4
cgay
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost