Hey,
this is a simple question. I am new to the whole visual C# scene.
I am creating a simple "Find Word" dialog box. I have the menu working: File -> Find -> Find Word....then it pops up my alternate form. On the form, there is a textbox entry field. I want to take the text from that textbox and search for it in a rich text box in the original form....here's a snippet of my code that is giving me an error:
String searchKey = textToFind.Text;
int strLength = Form1.richTextBox1.Text.Length;
Form1.richTextBox1.Find(searchKey, 0, strLength, 0);
I get the error: Form1.richTextBox1 is inaccessible due to its protection level.
Here is the class declaration of form 1:
public class Form1 : System.Windows.Forms.Form
it's public. Why am I having accessibility issues?
Thanks in advance!