CLASS A -> it is a form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.aupdate();
AppendTextBoxLine("Class A update");
}
public void AppendTextBoxLine(string myStr)
{
if (textBox1.Text.Length > 0)
{
textBox1.AppendText(Environment.NewLine);
}
textBox1.AppendText(myStr);
MessageBox.Show(myStr);
}
}
}
This is class b
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
class Class1
{
public void aupdate()
{
Form1 y = new Form1();
y.AppendTextBoxLine("Class B Update");
}
}
}
Thanks in Advance

New Topic/Question
Reply



MultiQuote







|