tgoop.com/CsharpWindowsForm/33
Last Update:
5
قم بالرجوع للفورم واضغط على الزر double click للدخول للحدث Click
private void button1_Click(object sender, EventArgs e)
{
label1.Text = textBox1.Text;
this.BackColor = Color.Red;
}
من قائمة الاحداث للفورم افتح الحدث FormClosed واكتب هذا الكود
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
Properties.Settings.Default.color = this.BackColor;
Properties.Settings.Default.txtBox = textBox1.Text;
Properties.Settings.Default.lbl = label1.Text;
Properties.Settings.Default.Save();
}
والى اخر خطوة افتح دالة الحدث Load
private void Form1_Load(object sender, EventArgs e)
{
this.BackColor = Properties.Settings.Default.color;
textBox1.Text = Properties.Settings.Default.txtBox;
label1.Text = Properties.Settings.Default.lbl;
}
BY برمجة تطبيقات الويندوز C# Programming
Share with your friend now:
tgoop.com/CsharpWindowsForm/33