public partial class ThanglishToTamilGUI : Form { public string anz; public ThanglishToTamilGUI() { InitializeComponent(); } public void btnConvertToBraille_Click(object sender, EventArgs e) { anz = richTextBoxTamil.Text.ToString(); GUI.TamilToBrailleGUI c1 = new GUI.TamilToBrailleGUI(); c1.Visible = true; } } I need to pass my richtextbox (richTextBoxTamil) content to variable call anz.
I am retrriving anz variable in other form as form load event:
private void TamilToBrailleGUI_Load(object sender, EventArgs e) { ThanglishToTamilGUI tt = new ThanglishToTamilGUI(); String apper = tt.anz; richTextBoxTamil.Text = apper; } My Problem: I am getting null values as result. Since if I assigned any values that invoked correctly.
public partial class ThanglishToTamilGUI : Form { public string anz = "Hai"; public ThanglishToTamilGUI() { InitializeComponent(); } ... Here my ans value is passed as "Hai". But my requirement is to get what ever the content in the richTextBoxTamil and pass it to that public variable call anz. What went wrong here please help me.
Thank you.