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