-1

I have searched but I couldn't find the answer.There is the form witch users can set the property for some controls like buttons, textBox and etc.I would like to be able to set these properties(whitch users choosed) when all the forms are loading or initialized.Is there any attribute for setting these properties?

whats the best way? (the project has 20 forms and every form has more than 10 controls)

4

2 回答 2

0

实现表单的 Load 事件处理程序并在那里设置属性。例如:

public void MyForm_OnLoad(object sender, EventArgs e)
{
    MyTextBox.Text = "Hello!";
}
于 2013-10-07T05:53:49.467 回答
0

您可以使用表单加载事件

public void yourform_load(object sender, EventArgs e)
{
 //Set attributes here
}
于 2013-10-07T05:55:57.993 回答