因为open和save 2个filedialog的背景色需要修改,查了很多办法都改不了。所以打算自己写一个,但是没什么思路,所以求助各位

解决方案 »

  1.   

    你可以使用一款换肤的组件。外加自己编写主题。换肤组件接管了界面绘制的API,所以包括FileDialog在内的所有对话框的界面都被替换了。当然,你也可以为你这个特定的需求这么做,但是按照你的水平,似乎会比较难。
      

  2.   

    重写控件 
    例子: class lab : Label//例子 { public Label CreateLab(string labName, int x, int y, int w, int h, string text) { this.Name = labName; this.AutoSize = true; this.Location = new System.Drawing.Point(x, y); this.Size = new System.Drawing.Size(w, h); this.Text = text; return this; } } private void button1_Click(object sender, EventArgs e)//调用 { lab l = new lab(); l.CreateLab("lab", 10, 29, 20, 20, "完成"); this.Controls.Add(l);//动态添加 } 再次用的时候就不用每个属性去设置了