Click here to Skip to main content
13,192,426 members (55,829 online)
Rate this:
Please Sign up or sign in to vote.
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 20-Feb-13 20:52pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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();
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
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
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Hide the default Widget button and make a labellink as 'X' and onClick Event code will be 'this.close'.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171017.2 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100