G
gary
I am newbie to dotnet.
I wanna make codefile.cs store global variables and procedures so that
form1,form2...formx could call them. but I have 2 questions
1. may I create codefile.cs like the following:
using System.Windows.Forms;
public void MsgBox(string s)
{
MessageBox.Show(s,"Info",btns,icons);
}
2. I call MsgBox in form1.cx, may I call it directly? And if I wanna get a
form2 instance in form1.cs, may I call it like the following?
form2 f2=new form2(this);
f2.Show();
thanks.
I wanna make codefile.cs store global variables and procedures so that
form1,form2...formx could call them. but I have 2 questions
1. may I create codefile.cs like the following:
using System.Windows.Forms;
public void MsgBox(string s)
{
MessageBox.Show(s,"Info",btns,icons);
}
2. I call MsgBox in form1.cx, may I call it directly? And if I wanna get a
form2 instance in form1.cs, may I call it like the following?
form2 f2=new form2(this);
f2.Show();
thanks.