-
GlowButton - 发光的按钮控件
翻译 maninwest@Codeforge 作者:John Underhill @ Codeproject最近我在查看 KMP Player 软件上的一些图形元素(如果你想看看好的图形设计,我建议你也查看一下)。我在项目中需要的是一个简单的发光按钮控件,用于玩家控制的,这不是什么太神奇的东西,只是在鼠标悬停时能够改变颜色。让图像更改颜色很简单,只需修改 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 = ParseColor(clr.B);
cm.Matrix33 = ParseColor(clr.A);
cm.Matrix44 = 1f;
// set matrix
ia.SetColorMatrix(cm);
// draw
g.DrawImage(img, bounds, 0, 0, img.Width,
img.Height, GraphicsUnit.Pixel, ia);
}
}示例代码中的 ParseColor 会将位转化为浮点值。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2023-07-25 02:55:04下载
- 积分:1
-
很好的时间控件,只需要在vb中加载就可以用
很好的时间控件,只需要在vb中加载就可以用-good time controls in vb only need to load it may
- 2022-05-30 12:57:48下载
- 积分:1
-
此代码可以实现对任意颜色的按钮的添加
此代码可以实现对任意颜色的按钮的添加-This code can be any color of the add button. . .
- 2022-09-14 05:05:03下载
- 积分:1
-
VC学习笔记之一:怎样实现XP风格按钮
这是一个非常不错的例子程序,值得推荐...
VC学习笔记之一:怎样实现XP风格按钮
这是一个非常不错的例子程序,值得推荐-VC study notes one : how to achieve the XP style button this is a very good example of the procedure, should be commended
- 2022-04-11 05:10:39下载
- 积分:1
-
克隆按钮方便你可以改变参数
to clone ibuttons easy and you can change parameters
- 2022-06-17 19:08:51下载
- 积分:1
-
MouseDown、MouseUp、MouseMove。VB 似乎提供了很好的 Mouse 事件。但好象还缺少什么!对!还差 MouseExit(鼠标移出)事件...
MouseDown、MouseUp、MouseMove。VB 似乎提供了很好的 Mouse 事件。但好象还缺少什么!对!还差 MouseExit(鼠标移出)事件。-MouseDown, MouseUp, MouseMove. VB seems to provide a good Mouse incident. But what seemed to lack! Right! Worse MouseExit (mouse outflow) incident.
- 2022-03-26 00:53:31下载
- 积分:1
-
cwinxpbuttonst是CButtonST类派生类模拟看N的感觉…
CWinXPButtonST is a CButtonST derived class that emulates the look n feel of the buttons (or menu items) found in Office XP and, maybe, in Windows XP. Button borders can have square or rounded corners.
This is just an example on how CButtonST can be used to create other button styles not supplied by defaultCButton
- 2022-07-04 23:20:46下载
- 积分:1
-
用VC++编写的用以显示aimde分形图的小程序
用VC++编写的用以显示aimde分形图的小程序-with VC++ for the show aimde Fractal small procedures
- 2022-06-02 07:49:09下载
- 积分:1
-
修改标题栏的颜色,你可以定义自己的颜色,这是很方便的
修改titlebar颜色,可以自己定义其颜色,十分方便-Modify titlebar color, you can define its own color, which is very convenient
- 2023-04-28 01:20:04下载
- 积分:1
-
仿抽屉控件 来源于codeproject 希望能给你带来方便哈
仿抽屉控件 来源于codeproject 希望能给你带来方便哈-Imitation drawer control from codeproject hope you can bring convenience to Kazakhstan
- 2022-01-31 19:58:44下载
- 积分:1