12/8/2022 0 Comments Pen gradient vb.netThe application just uses that boring gray background color that you see in many applications. There are people who don't even bother to look for a color. I applaud this, but why not take it one step further and choose two colors? The bad They look for a consistent background that will make their product stand out and recognizable. There are people who take the time to look for the right color for their application. Laaaadieees and Gentlemeeen, start your Visual Studioooo's! The good, the bad and the gradient The good I promise the only thing you will have to do is to set the colors. This article will show you how to do this in a very easy way, with a small base class that you can use in your application. I found his approach rather complicated and lengthy for such an easy task. I looked in CodeProject and saw that there was already an article on GradientForms by Erdal Halici. Sometimes even a light gradient is enough to make your product stand out in the crowd. One of those is having a gradient background on your form. NET which can make your application look better with minimal effort. There are certain things that you can do in. Mostly because they think it is too hard or that it takes too much time. Check the VB Helper Web site or sign up for my newsletter to learn more about this book when it is available.I have noticed that a lot of programmers don't bother about the looks of their software. My next book includes a lot more information on Pens, Brushes, and other drawing objects in VS 2005. Point1 As Point, ByVal point2 As Point, ByVal color1 As _Ĭolor, ByVal color2 As Color, ByVal line_width As _ĭim the_brush As New LinearGradientBrush( _ĭim the_pen As New Pen(the_brush, line_width) Private Sub DrawGradientLine(ByVal gr As Graphics, ByVal _ ' Draw a line from (x1, y1) to (x2, y2) fading from ' color1 to color2. It then uses the Brush to make a Pen and draws with the Pen. Subroutine DrawGradientLine creates a LinearGradientBrush that lies between the line's start and end points. Each line draws with its own LinearGradientBrush defined to lie along itself.īrush, Pen, LinearGradientBrush, color, blend, drawing, DrawGradientLine This example shows how to draw lines that lie along a color gradient in VB. NETĭraw lines that lie along a color gradient in VB. VB Helper: HowTo: Draw lines that lie along a color gradient in VB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |