TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nasim Ul Haq
NA
2
0
Changing Text property of textbox from another class
Jun 25 2008 6:09 AM
Hi
I want to change my text in the textbox on a form but the text property of textbox control is not changing the text in another class. I don't want to return anything from the class1's method(textChanged();)
// This is Form Code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void button1_Click(object sender, EventArgs e)
{
Class1 cs = new Class1();
cs.textChanged();
}
}
//This is class code
public class Class1
{
public void textChanged()
{
Form1 frm1 =new Form1();
frm1.textBox1.Text = "HELLO FARAZ";
}
}
please solve my problem thanks in advance.
Reply
Answers (
1
)
User Interface in one class, processing in a different class
Form.TopMost causes an ObjectDisposedException when closing...