Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how i can make star or circle or in some other shape login forms
Posted
Updated 11-Feb-12 10:51am
v2
Comments
Sergey Alexandrovich Kryukov 11-Feb-12 16:53pm    
Even though I had to add a proper tag to your question, I voted 5 for it, which happens very rarely.

The question is correctly formulated and interesting enough. It is often answered incorrectly, so make sure you understand a right way.
--SA

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Feb-12 16:44pm    
This article is totally wrong.

Sorry, but this is why I had to vote 1: you should give answers only if you are sure that your advice really work, not repeat some other answers. You should validate the advice given by someone if you want to make it your advice.

Moreover, this advice "almost works", which is even worse -- it can cause considerable harm the the inquirer who would waste a lot of time along a wrong lines.

"Do no harm" is most important. No advice is much better then wrong advice.
--SA
Rajeev Jayaram 12-Feb-12 12:00pm    
Thanks SA for your guidance.
Sergey Alexandrovich Kryukov 12-Feb-12 13:21pm    
Thank you for understanding.
--SA
This is actually very simple to do: use the property System.Windows.Forms.Form.Region. Create some non-rectangular region and assign the value to this property. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx[^].

Please be advised that non-client areas of the form will be cut out, so make sure you don't use them. If you need something like a title bar for dragging, close button, etc., simulate then inside a visible part of client area.

Be careful to avoid using wrong advice like the one quoted by Rajeev. This advice is difficult to implement and it won't give you desired result: the form will remain non-rectangular. When you use my advice, it is truly non-rectangular, which is easy to validate using mouse clicks. Suppose you have a form with a hole inside. Click inside the hole, and the window underneath will be activated.

—SA
 
Share this answer
 
Comments
Rajeev Jayaram 12-Feb-12 12:03pm    
Not sure why someone downvoted your answer. To counter, take my 5!
Sergey Alexandrovich Kryukov 12-Feb-12 13:23pm    
Thank you, Rajeev.
--SA

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