登录
首页 » 按钮控件 » GlowButton - 发光的按钮控件

GlowButton - 发光的按钮控件

于 2023-07-25 发布 文件大小:709.70 kB
0 103
下载积分: 2 下载次数: 1

代码说明:

翻译  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%的代码片段,完整代码需下载后查看 加载中 侵权举报

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • VC经典tabview
    VC CLASSIC TABVIEW
    2023-09-05 10:45:03下载
    积分:1
  • child对话框
    child对话框 -child dialog.
    2022-03-16 05:13:27下载
    积分:1
  • Here is an XP
    Here is an XP-style Button. It works on all windows OSs: 95/98/Me/NT/W2K/XP. No subclassing etc is needed to use this control - it s just a plain simple button control. This code is a modified form of the OCX code I recently saw on codeguru. The button code was for an ActiveX control. I created this CButton derived class with latest Microsoft s sponsored CCP technology (Cut-Copy-Paste).-Here is an XP-style Button. It works on all windows OSs: 95/98/Me/NT/W2K/XP. No subclassing etc is needed to use this control- it s just a plain simple button control. This code is a modified form of the OCX code I recently saw on codeguru. The button code was for an ActiveX control. I created this CButton derived class with latest Microsoft s sponsored CCP technology (Cut-Copy-Paste).
    2022-01-31 08:46:53下载
    积分:1
  • 能够将软中灰色的,变为正常的状态,程序中用到了句柄的操作!...
    能够将软件中灰色的按钮,变为正常的状态,程序中用到了句柄的操作!-software can be gray button into a normal state, the procedures used to operate the handle!
    2022-02-26 05:09:27下载
    积分:1
  • 三级网络的学习材料,仅供参考,,,,,, 把zip改为doc即可
    三级网络的学习材料,仅供参考,,,,,, 把zip改为doc即可-three network of learning materials for reference Bowl put zip can read doc
    2022-01-24 09:11:56下载
    积分:1
  • Internet found a lot of buttons on the qt 4 rewrite the information, but only in...
    上网搜了很多关于qt 4重写按钮的资料,但是都只是介绍,没有源码。但是项目要求的按钮样式qt 4没有现成的,所以自己实现了一个简单的按钮。 模仿按钮的功能,通过重写 void paintEvent(QPaintEvent *event) void mousePressEvent(QMouseEvent *event) void mouseReleaseEvent(QMouseEvent *event) 三个函数达到绘制自定义按钮的目的。-Internet found a lot of buttons on the qt 4 rewrite the information, but only introduce, there is no source. But the project
    2022-07-20 10:38:05下载
    积分:1
  • 界面编程的小程序,可以实现位图
    界面编程的小程序,可以实现位图按钮-programming interface small programs, can achieve bitmap button
    2022-01-28 03:34:53下载
    积分:1
  • ImButton: 动态效果的 ValidateEdit: 可限制输入内容的输入框 UrlLabel: 可实现超级链接的标签 YbUpDownEdi...
    ImButton: 动态效果的按钮控件 ValidateEdit: 可限制输入内容的输入框 UrlLabel: 可实现超级链接的标签控件 YbUpDownEdit: 有上下箭头可以调整数值大小的输入框 YbBackImage: 背景位图,可以加入一个小位图平铺显示,也可以拉伸放缩等-ImButton : Dynamic effects of button controls ValidateEdit : to limit the importation of content input box UrlLabel : hyperlinks can be realized labeling controls YbUpDownEdit : The next arrow Numerical size can be adjusted to the input box YbBackImage : background bitmap, can join a small bitmap smooth, can also stretch Zooming, etc.
    2022-12-15 06:10:03下载
    积分:1
  • 实现xp button 的效果,主要是在vc++环境下弄的,实现非常哭的效果...
    实现xp button 的效果,主要是在vc++环境下弄的,实现非常哭的效果-xp button to achieve results, mainly in vc rise to an environment, to achieve great results cry
    2022-10-24 05:30:03下载
    积分:1
  • 利用这个Button类中的SetMenu()可以代替菜单,也可以设置下和起来的状态,使呈现动态效果,另一个重点就是它没有内存泄露问题。...
    利用这个Button类中的SetMenu()可以代替菜单,也可以设置按钮按下和起来的状态,使按钮呈现动态效果,另一个重点就是它没有内存泄露问题。-Button to take this category SetMenu () can replace the menu, you can set up the button press and the state, so that dynamic effects of a button, and the other key point is it does not have memory leak problems.
    2022-09-03 20:25:02下载
    积分:1
  • 696518资源总数
  • 105661会员总数
  • 6今日下载