在C#的子窗体画图
代码如下:public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public Form1(Button button1)
{
InitializeComponent();
this.button1.Hide();
}
private void ViewInstanceDialog_Paint(object sender, PaintEventArgs e)
{
// 为窗体中画线
Graphics line = CreateGraphics();
line.DrawLine(new Pen(Color.Gray, 1), new Point(10, 280), new Point(Width - 20, 280));
line.DrawLine(new Pen(Color.White, 1), new Point(10, 281), new Point(Width - 20, 281));
}
private void button1_Click(object sender, EventArgs e)
{
Form form2=new Form1(button1);
form2.ShowDialog();
form2.ViewInstanceDialog_Paint();
}
} c# --------------------编程问答-------------------- 各路大侠伸手教教小弟
补充:.NET技术 , C#