R
Robert
Hi
I have an Form1 class generated with studio with an listbox on it.
how can i access this listbox from other classes ?
public class Form1 : System.Windows.Forms.Form
{
public System.Windows.Forms.ListBox listBox1;
private void button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Add("some text");
}
}
public class ServerClass : MyTestInterface
{
public override string MyFirstMethod(string what)
{
// here i want to add some text to Form1.listbox1
return "" + what;
}
}
I have an Form1 class generated with studio with an listbox on it.
how can i access this listbox from other classes ?
public class Form1 : System.Windows.Forms.Form
{
public System.Windows.Forms.ListBox listBox1;
private void button1_Click(object sender, System.EventArgs e)
{
listBox1.Items.Add("some text");
}
}
public class ServerClass : MyTestInterface
{
public override string MyFirstMethod(string what)
{
// here i want to add some text to Form1.listbox1
return "" + what;
}
}