做一个类同WinForm功能开发的思路
如:我拉一个Button,到FORM上,Button可以设置其属性,怎么做出像这种的功能?
这种问题很普遍,而且很多地方使用。如自己开发一个系统,想让别人在自己的系统上进行二次开发,则需要拉相关字段,然后设置各字段的属性。然后运行!这可以产生报表等等。

解决方案 »

  1.   

    你使用PropertyGrid 控件啊,不很好用吗?
      

  2.   

    比如:
    public Form1() {   // The initial constructor code goes here.
     
       PropertyGrid propertyGrid1 = new PropertyGrid();
       propertyGrid1.CommandsVisibleIfAvailable = true;
       propertyGrid1.Location = new Point(10, 20);
       propertyGrid1.Size = new System.Drawing.Size(400, 300);
       propertyGrid1.TabIndex = 1;
       propertyGrid1.Text = "Property Grid";   this.Controls.Add(propertyGrid1);   propertyGrid1.SelectedObject = textBox1;
      

  3.   

    老兄,怎么做成Access或水晶报表那种界面?将数据字段拉到界面上?是不是用拖拉操作?好像拖拉操作不能操作控件,只能操作字符耶,怎么实现?给个思路!