P
polarz
I'm having trouble getting items from different classes to display in
my textBox.
e.g.
private void button2_Click(object sender, System.EventArgs e)
{
someData sd = new someData();
sd.showData();
}
class someData : Form1
{
public void showData()
{
textBox1.Text="Some Stuff Here";
}
}
nothing shows up in the textBox when I press the button
I also tried
class someData : SomeOtherClassHere
{
public void showData()
{
Form1 f = new Form1();
f.textBox1.Text="Some Complete BS Here";
}
}
which is what I'd like to do, use a form that uses a class other than
Form1
I'm a pretty new programmer and don't have much experience with
windows forms, any help is much appreciated. Thanks
my textBox.
e.g.
private void button2_Click(object sender, System.EventArgs e)
{
someData sd = new someData();
sd.showData();
}
class someData : Form1
{
public void showData()
{
textBox1.Text="Some Stuff Here";
}
}
nothing shows up in the textBox when I press the button
I also tried
class someData : SomeOtherClassHere
{
public void showData()
{
Form1 f = new Form1();
f.textBox1.Text="Some Complete BS Here";
}
}
which is what I'd like to do, use a form that uses a class other than
Form1
I'm a pretty new programmer and don't have much experience with
windows forms, any help is much appreciated. Thanks