 |
Create a gradient background
|
Total Hit (4846) |
a gradient brush is a brush that contains all the color nuances that vary from a starting color to an ending color, like the typical background screen of many installation procedures or Microsoft PowerPoint slides. The simplest way to create a linear gradient brush is passing its size (by means of a
....Read More |
Rating
 |
|
 |
Dashed lines with custom caps
|
Total Hit (4697) |
You can set properties of the Pen object to create custom lines. For example, you can use the DashStyle enumerated property to draw dashed lines using a predefined pattern, and you can even create custom dash patterns by assigning an array of Single values to the DashPattern property. The StartCap a
....Read More |
Rating
 |
|
 |
Drawing Bézier splines
|
Total Hit (3690) |
GDI+ supports two different forms of a complex curve that can't be represented as an arc of a circle or an ellipse: a cardinal spline and a Bézier spline. A Bézier spline is a curve specified by four points: the initial point, the ending point, and two control points. The curve doesn't pass through
....Read More |
Rating
 |
|
 |
Drawing Cardinal splines
|
Total Hit (4639) |
GDI+ supports two different forms of a complex curve that can't be represented as an arc of a circle or an ellipse: a cardinal spline and a Bézier spline. A cardinal spline is the curve that you would create by taking a piece of flexible material-such as a thin stripe of iron or wood-and making it p
....Read More |
Rating
 |
|
 |
Measuring a string drawn with a specific font
|
Total Hit (2834) |
When you're dynamically drawing text (either on a Windows Form or Web Form application), you may need to calculate the width and height of a string printed with a particular font. This is easy with the Graphics class's Measure string method, that takes in input the string being measured, and the fon
....Read More |
Rating
 |
|
 |
Process individual pixels of a bitmap
|
Total Hit (4120) |
While you can access individual pixels of a bitmap by means of the GetPixel and SetPixel methods of the Bitmap object, in practice you seldom want to use these methods, as they are simply too slow for most cpu-intensive operations. Fortunately there is a faster way, which consists of moving all the
....Read More |
Rating
 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
 |
Using Animated Cursors in .NET
|
Total Hit (2003) |
The Cursor class provided with System.Windows.Forms doesn't support animated cursors - but this tiny class lets you use them interchangably with the existing .NET Framework cursors. Also provided with the code is a technique for drawing cursors directly onto forms and animating on a background threa
....Read More |
Rating
 |
|
 |
A .NET Implementation of the ZoomIn Utility
|
Total Hit (2335) |
The ZoomIn Utility enables you to look at any area of the screen and capture the display. This can be an excellent way to snip graphics from other applications or to work out the exact details of how other controls are drawn. A copy of this is provided along with Visual Studio as a tool and also as
....Read More |
Rating
 |
|
|
 |
Fun With DrawImage
|
Total Hit (1402) |
If you've ever tried to rotate an image in VB6, you know how tedious it can be. Sure, given plenty of time for trial and error, combined with some reasonably tricky mathematics and a little patience, you can figure out how to map pixels from the source image into the rotated destination image. Enter
....Read More |
Rating
 |
|