Files
docs-desktop/dotnet-desktop-guide/framework/winforms/advanced/how-to-create-a-shaped-windows-form.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.8 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Create a Shaped Windows Form 03/30/2017
csharp
vb
cpp
forms [Windows Forms], rounded
Windows Forms, custom shapes
Windows Forms, shaped
shaped forms
forms [Windows Forms], changing the shape of
forms [Windows Forms], circular
forms [Windows Forms], nonrectangular
Windows Forms, nonrectangular shape
Windows Forms, rounded
Windows Forms, circular
forms [Windows Forms], custom shapes
6e6041e0-8e67-4487-b1e9-e410dbd1ef6c

How to: Create a Shaped Windows Form

This example gives a form an elliptical shape that resizes with the form.

Example

[!code-cppSystem.Drawing.ConceptualHowTos#10] [!code-csharpSystem.Drawing.ConceptualHowTos#10] [!code-vbSystem.Drawing.ConceptualHowTos#10]

Compiling the Code

This example requires:

This example overrides the xref:System.Windows.Forms.Control.OnPaint%2A method to change the shape of the form. To use this code, copy the method declaration as well as the drawing code inside the method.

See also