改头换面——用DotNetBar控件替换系统控件(C#)

来源:互联网 发布:国研网统计数据库 编辑:程序博客网 时间:2024/05/08 08:18

用vs打开项目,对整个项目的代码进行文本替换,并进行一些手工调整,可实现将原系统控件变为DotNetBar控件。


System.Windows.Forms.Button

替换为:
DevComponents.DotNetBar.ButtonX

无需手工调整。

System.Windows.Forms.ComboBox

替换为:
DevComponents.DotNetBar.Controls.ComboBoxEx

再手工将所有新的组合框的DrawMode属性改为 OwnerDrawFixed

System.Windows.Forms.TextBox

替换为:
DevComponents.DotNetBar.Controls.TextBoxX

无需手工调整。

 

System.Windows.Forms.DataGridView

替换为:
DevComponents.DotNetBar.Controls.DataGridViewX

需手工根据原控件的事件对新控件进行重新设置。

余类推。