In .NET, GDI+ functionality resides in the System.Drawing.dll. Before you start using GDI+ classes, you must add reference to the System.Drawing.dll and import System.Drawing namespace. In this sample, I use class GraphicsPath, which is defined in the System.Drawing.Drawing2D namespace.
Creating this project is simple. Create a Windows application and add reference to the System.Drawing.dll using Project->Add Reference menu item. See Figure 1.Figure 1. Adding reference to System.Drawing.dll
After that add these two lines.
using
Note: If you create a Windows application using VS.NET, you only need write only one line.
using System.Drawing.Drawing2D;
After that add a Form_Paint event handler using the Properties Window. See Figure 2.
Figure 2. Adding Form_Paint event handler.
And write the following code on the Form_Paint event handler.
Figure 3.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: