How do I create a gradient background on a form in C# .net 3.5?

Posted on 2008-11-08
Last Modified: 2013-12-17
Hi Guys,

There is no clear cut example on how to do this. I need to create a function that can create a gradient background on a windows form which can show a gradient with three colors. The key here is I want the gradient to show through a transparent button or panel. The examples out there are poor and when I set a control to transparent,the gradient does not show through. The transparency goes to the root color of the form. I want to make the gradient the root color of the form. Can anyone show me how to accomplish this?


Question by:MrTouya

    Accepted Solution

    You may look the gradient panels example from

    Author Comment

    Thanks!. Than helped.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now