Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all ,

i have a win form , i want its close button placement on right side of the win form like widgets.
to close the widget we press the close button on the right side of the widget . it is placed parallel panel with widget. like windows 7 widgets.

now how can i do same with widows form.

is it possible?
Posted

You can't move or easily change the standard window components, such as the close button - I think the only way you are going to be able to do that is to remove the standard components and emulate them in your own code.
 
Share this answer
 
on the form > formborderstyle select none> then create a button that you like then position it
then the code behind is either this.Close(); or Application.Exit();
 
Share this answer
 
Comments
syedaliaizazuddin 21-Feb-13 3:27am    
how can i place it to parrallel to its wall?
syedaliaizazuddin 21-Feb-13 4:36am    
@jenicamae how can i stik that button out side the forms?
like widgets have outside panl in right hand side and it is stik o its wall...
jenicamae 21-Feb-13 20:59pm    
@syedaliaizazuddin http://www.squidoo.com/irregular-shaped-windows-form-transparency
you need to make the side of the form transparent and you can place the button on the transparent portion of the form that makes it like it is in the outside part of the form
Hide the default Widget button and make a labellink as 'X' and onClick Event code will be 'this.close'.
 
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