K
KC Eric
Hi all,
Suppose I have a form, and a button, the form has these functions:
private void button1_Click(object sender, System.EventArgs e)
{
Start();
}
public void Start()
{
Graphics g = this.CreateGraphics();
g.DrawString("start!", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 460, 10);
g.Dispose();
}
Inside
private void InitializeComponent(),
I have
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);
my question is,
after I click the button, the Start() is called and so "start!" would appear
in the form,
but if I move the form or resize the form, Form1_Paint() would called, and
"start!" would disappear,
is there any easy way to keep the "start!" ?
Thanks
KC Eric
Suppose I have a form, and a button, the form has these functions:
private void button1_Click(object sender, System.EventArgs e)
{
Start();
}
public void Start()
{
Graphics g = this.CreateGraphics();
g.DrawString("start!", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 460, 10);
g.Dispose();
}
Inside
private void InitializeComponent(),
I have
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);
my question is,
after I click the button, the Start() is called and so "start!" would appear
in the form,
but if I move the form or resize the form, Form1_Paint() would called, and
"start!" would disappear,
is there any easy way to keep the "start!" ?
Thanks
KC Eric