GlowButton - A Glowing Button Control
2016-08-23
0 0 0
4.0
Other
Earn points
Translated by maninwest@Codeforge Author:John Underhill @ Codeproject
Just a Quickie...
Recently I came across the KMP Player software, and was looking over some of the graphic elements (and if you want to see some really good graphics work, I recommend you check it out). One of the elements that I need for a project was a simple glowing button control, used for the player controls, nothing too fancy, just an image that changes color and glows when hovered.
Getting an image to change color is rather trivial, it is done by modifying the color matrices of an ImageAttribute:
private void DrawColoredImage(Graphics g, Image img, Rectangle bounds, Color clr) { using (ImageAttributes ia = new ImageAttributes()) { ColorMatrix cm = new ColorMatrix(); // convert and refactor color palette cm.Matrix00 = ParseColor(clr.R); cm.Matrix11 = ParseColor(clr.G); cm.Matrix22 =
c#
控件
按钮
发光
GlowButton
Related Source Codes
No. 186: DX0110- Source code for community propert
0
0
no vote
No. 219: DX0149- Source code for community propert
0
0
no vote
Verification code identification
0
0
no vote
CSV data analysis tool
0
0
no vote
Source code of hospital medical record information
0
0
no vote
No comment