Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When there is a title bar and border to winform then minimize effect i,e. animation in which window will minimize to task bar slowly will play/occur. but when i remove the border of winform and try to minimize it the animation will not play. So friends how to retain this animation effect.?
Posted
Updated 12-May-17 5:04am
v2

on some button's click or key/key combination's press events
in c#
C#
this.WindowState = FormWindowState.Minimized;

in vb
VB
Me.WindowState = FormWindowState.Minimized

Happy Coding!
:)
 
Share this answer
 
Comments
VIPINVIVEK 16-Oct-12 8:08am    
Not minimizing the form aarti. If you observe the difference between minimizing the window with border and window without border you will find this window with border wont minimize as soon as you press button.it will minimize slowly to task bar. I want to retain the same effect in border less forms also.
I think I know what you need.

This is your situation:
1. Border-less Windows Form
2. Minimize Button

To minimize you simply add the following code on the button's click event.
C#
this.WindowState = FormWindowState.Minimized;


But, this will not give you the "Genie Effect" when the form is been minimized.

To gain that effect, in WPF, check the this link.

For WinForms, I couldn't find a solution yet.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900