displaying results in another form
-
Hi i have a form1 that allows user to search for words. Then i have another form2 that is for displaying the results, taking into consideration the parameters from form1. However i have errors telling me that the richTextBox1 that i'm using it in form2 is inaccessible due to its protection level. Error 1 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 126 32 LookUpShakespeare Error 2 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 127 32 LookUpShakespeare Error 3 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 135 40 LookUpShakespeare Error 4 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 136 40 LookUpShakespeare Error 5 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 137 40 LookUpShakespeare Error 6 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 138 40 LookUpShakespeare Can anyone help me to solve this? FORM1
using LookUpShakespeare.GoogleSvc; namespace LookUpShakespeare { public partial class Form2 : Form { public Form2() { InitializeComponent(); } public TextBox t1 = new TextBox(); public TextBox t2 = new TextBox(); private void btnGenerate_Click(object sender, EventArgs e) { String buildTerm = ""; if (radioButton5.Checked == true) buildTerm = word.Text; else buildTerm = "\"" + word.Text + "\""; if (radioButton2.Checked == true) buildTerm = "-" + buildTerm; if (txtSearchString.Text != "") if (radioButton4.Checked == true) buildTerm = " OR " + buildTerm; else buildTerm = " " + buildTerm; if (checkBox3.Checked == true) { t1.Text = "true"; }
-
Hi i have a form1 that allows user to search for words. Then i have another form2 that is for displaying the results, taking into consideration the parameters from form1. However i have errors telling me that the richTextBox1 that i'm using it in form2 is inaccessible due to its protection level. Error 1 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 126 32 LookUpShakespeare Error 2 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 127 32 LookUpShakespeare Error 3 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 135 40 LookUpShakespeare Error 4 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 136 40 LookUpShakespeare Error 5 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 137 40 LookUpShakespeare Error 6 'LookUpShakespeare.Form4.richTextBox1' is inaccessible due to its protection level G:\WebServices\Project\Projects\LookUpShakespeare\LookUpShakespeare\Form2.cs 138 40 LookUpShakespeare Can anyone help me to solve this? FORM1
using LookUpShakespeare.GoogleSvc; namespace LookUpShakespeare { public partial class Form2 : Form { public Form2() { InitializeComponent(); } public TextBox t1 = new TextBox(); public TextBox t2 = new TextBox(); private void btnGenerate_Click(object sender, EventArgs e) { String buildTerm = ""; if (radioButton5.Checked == true) buildTerm = word.Text; else buildTerm = "\"" + word.Text + "\""; if (radioButton2.Checked == true) buildTerm = "-" + buildTerm; if (txtSearchString.Text != "") if (radioButton4.Checked == true) buildTerm = " OR " + buildTerm; else buildTerm = " " + buildTerm; if (checkBox3.Checked == true) { t1.Text = "true"; }