Ahmet Ekrem SABAN
asked on
How to get filling effects for a colour under Windows Forms?
Hello!
I am involved in a C# Windows Forms project, where I am making the GUI. It is my first C# and Windows Forms project.
I have created several forms where I want to have a background colour with filling effects. The same is true for the buttons.
What I want is similar to that one can achieve with Microsoft Office applications, like Word, where you can add a drawing to a document over the menu "Insert" > "Graphic..." > "New drawing". You may change the colour of an object by clicking on it, then by clicking the right mouse button and selecting "Format AutoForm...", where the filling effects can be seen on the Color combo box (see the bottom of the colour list).
Thank you for your replies!
I am involved in a C# Windows Forms project, where I am making the GUI. It is my first C# and Windows Forms project.
I have created several forms where I want to have a background colour with filling effects. The same is true for the buttons.
What I want is similar to that one can achieve with Microsoft Office applications, like Word, where you can add a drawing to a document over the menu "Insert" > "Graphic..." > "New drawing". You may change the colour of an object by clicking on it, then by clicking the right mouse button and selecting "Format AutoForm...", where the filling effects can be seen on the Color combo box (see the bottom of the colour list).
Thank you for your replies!
ASKER
I am on vacation for a week.
I do not think that this much has to be spend for that, as I heard that a colleague here at our customer did it with Microsoft Visual Studio 2010. I will inform you, if it is true what I heard.
I do not think that this much has to be spend for that, as I heard that a colleague here at our customer did it with Microsoft Visual Studio 2010. I will inform you, if it is true what I heard.
Your colleague might have found some OpenSource components.
Personally, specially for my professional jobs, I shy away from those, because they are often buggy or incomplete, and I always fear maintenance problems the day where Microsoft decides to drop or change something that makes a component unusable.
Reputable vendors usually will make their best to develop controls that comply with Microsoft recommandations, and they are close enough to Microsoft that they have access to early builds of a new OS or a new version of VS, so they are ready to send you an update when you need one.
Personally, specially for my professional jobs, I shy away from those, because they are often buggy or incomplete, and I always fear maintenance problems the day where Microsoft decides to drop or change something that makes a component unusable.
Reputable vendors usually will make their best to develop controls that comply with Microsoft recommandations, and they are close enough to Microsoft that they have access to early builds of a new OS or a new version of VS, so they are ready to send you an update when you need one.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the solution by myself on the Internet
This is not a texture, this is a gradient.
ASKER
That's correct! But I do not need any textures, but only a gradual change of colour from one to another.
Just the form that is needed for user selection can end up being quite an endeavour.
If this is for a library that you want to reuse and have plenty of time, you could go for it, but if it is for use in only on or two applications, the time needed is probably an overkill.
If I were you, I would look for a kit of components that have the feature already built-in. And the results might look a lot more professional than what you could achieve unless you already have a good experience in graphics and working with the GDI+ library that is used for drawings.
The price you would pay for that would probably be a lot less than what it would cost you in time. There are many sources for those collections of components.
ComponentOne has a good set at http://www.componentone.co
I don't do textures and patterns in my work, but if you want I can send you some sample code for gradients. It's from a VB application, but the code is similar in C# since we use the same classes.