mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-06 16:06:07 +02:00
* 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
1.8 KiB
1.8 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| How to: Draw a Line with Line Caps | 03/30/2017 |
|
|
eb68c3e1-c400-4886-8a04-76978a429cb6 |
How to: Draw a Line with Line Caps
You can draw the start or end of a line in one of several shapes called line caps. GDI+ supports several line caps, such as round, square, diamond, and arrowhead.
Example
You can specify line caps for the start of a line (start cap), the end of a line (end cap), or the dashes of a dashed line (dash cap).
The following example draws a line with an arrowhead at one end and a round cap at the other end. The illustration shows the resulting line:
[!code-csharpSystem.Drawing.UsingAPen#71] [!code-vbSystem.Drawing.UsingAPen#71]
Compiling the Code
- Create a Windows Form and handle the form's xref:System.Windows.Forms.Control.Paint event. Paste the example code into the xref:System.Windows.Forms.Control.Paint event handler passing
eas xref:System.Windows.Forms.PaintEventArgs.
