珂珂的个人博客 - 一个程序猿的个人网站

最新发布

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(十)-右键菜单

admin 阅读(3070) 评论(0)

右键菜单的绘制有点特别 它是通过Renderer 属性,所以绘制部分是继承ToolStripProfessionalRenderer右键菜单的代码继承自ContextMenuStripusingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Windows.Forms; usingSystem.Drawing; usingSystem.Drawing.Drawing2D; usingSystem.ComponentModel; usingFYJ.Winform.Util; name [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(六)-按钮2

admin 阅读(2779) 评论(0)

还有一个继承自PictureBox的按钮,也是跟第一个原理差不多usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.ComponentModel; usingSystem.Drawing; usingSystem.Windows.Forms; usingFYJ.Winform.Util; namespaceFYJ.Winform.Controls { [DefaultEvent("Click")] publicclassImageButton:Syst [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(八)-文本框

admin 阅读(2494) 评论(0)

由于系统的TextBox不太好看,也自己重绘一个,没有继承自TextBoxusingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Drawing; usingSystem.Windows.Forms; usingSystem.ComponentModel; namespaceFYJ.Winform.Controls { publicpartialclassCommonTextBox:System.Windows.Forms.UserControl { privateGraph [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(七)-按钮3

admin 阅读(2854) 评论(0)

还实现了另外种按钮ImageButton 它是继承自PictureBox,并且不需要为按钮设置几张不同状态的图片如这个界面上的按钮就是这种这是鼠标移进去的效果 是重绘而来的usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.ComponentModel; usingSystem.Drawing; usingSystem.Windows.Forms; usingFYJ.Winform.Util; namespaceFYJ.Winform.Controls { [Default [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(五)-按钮1

admin 阅读(3012) 评论(0)

由于是用的自定义的按钮,系统按钮不能满足要求,所以需要对控件进行一定扩展,如果是继承Button有时会出现黑框,所以继承UserControl并且实现IButtonControl接口写了5种状态,正常情况、进入按钮区域、按下按钮、移出按钮区域、按钮被禁用,这5种状态是换5张不同的图片,也可以是一张图片进行不同区域的截取usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Drawing; usingSystem.ComponentModel; usingSystem.Windows.Fo [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(二)-基窗体

admin 阅读(3519) 评论(0)

接前面,来看主窗体代码构造函数和属性privateSizeoldSize; publicBaseForm() { InitializeComponent(); if(!DesignMode) { //StrongNameCodeAccessPermission.Demand(); } } publicboolAllowMove { get{return_allowMove;} set{_allowMove=value;} } privatebool_allowMove=true;重载Load事件Win32.CreateRoundRectRgn(0,0,this. [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(一)-效果图

admin 阅读(3317) 评论(0)

这是去年乃至前年做的一套皮肤控件,好久没管它了,之前也有些人问我要过源码,现在分享出来。之前积极性很高,还是花费了很多心血的,还想做到局部半透明,后来发现确实不太好做,要么做到了调整窗体大小就不行,还有窗体闪烁的问题也花了很多心思找了很多资料才解决。运用到了一些重绘和windows消息。先看看效果图吧下面是右键菜单项目结构这简单做一个系列,留着下篇来讲解 [...]   阅读全文