Solved

VBA Paint gradient change

Posted on 2012-04-09
2
334 Views
Last Modified: 2012-06-21
Hi. I am using the following code to paint my TaskPane, shown in the image below, but I need
the darker color to come further over to the right. So I need the fade to happen further to the right. Is that possible?

   Dim graphics As Graphics = e.Graphics()

        Dim rectBrush As New System.Drawing.Rectangle(0, 0, 2000, 430)
        Dim brush As LinearGradientBrush
        brush = New LinearGradientBrush(rectBrush, Color.FromArgb(46, 100, 160), _
                        Color.White, LinearGradientMode.Horizontal)
        graphics.FillRectangle(brush, rectBrush)

1
0
Comment
Question by:murbro
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 37823294
Have you tried increasing 2000 to a bigger value?...
0
 

Author Closing Comment

by:murbro
ID: 37823356
Did the trick! Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question