-1
public partial class UserLoginForm : Form
{
private void LoginForm_Load(object sender, EventArgs e)
{
Common.UserLoginFormObject = this; //Store UserLoginForm Object in Static class Common.
}
private void DoSomething()
{
//some code
}
}
public partial class MainForm : Form
{
private void cmdLogOut_Click(object sender, EventArgs e)
{
Common.UserLoginFormObject.DoSomething();//Now here i have to call Dosomething function.
}
}
如何从另一种形式呼叫形式1功能 另一种形式的呼叫形式1功能
@HenkHolterman他已经有了'UserLoginForm'的对象!不需要使它成为静态的.. – Anirudha 2013-05-11 13:03:33