关于PropertyGrid控件的详细用法请参考文献: 1.C# PropertyGrid控件应用心得 2.C#自定义PropertyGrid属性 首先定义一个要在下拉框显示的控件: using System; using System.Windows.Forms; namespace Simon.WinForms.Examples.PropertyGrid { public class EditorControl : UserControl { public EditorControl() {
部门树形结构.设计张部门表用于存储部门编码.名称.上级部门id,使用Treeview控件显示部门树,并实现部门增删改.移动.折叠等功能.特别提示,部门有层级关系,可用donetbar的adtree控件 代码如下 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using S
PictureBox是C#常用图片空间,本文是学习中搜集网络资料的一些整理和记录 1,PictureBox加载图片 using System.Drawing; //方式1,从图片文件载入 //下面的路径是写死的,可以获取程序运行路径,这样更灵活 Image AA = new Bitmap(@"/Program Files/PictureBoxControlTest/tinyemulator_content.jpg"); pictureBox1.Image =AA; //方式2,通过im