I preparing a small notepad application,I have a problem is implementing FIND module.
I named the main notepad form as MainForm and Find dialog as FindForm, iam importing the mainform object into find form using parameter constructor and iam trying to access that object to search the word but not working. Iam i doing anything wrong or any semantic problem .Please guide me.
public partial class FindForm : Form
{
MainForm mForm;
public FindForm()
{
InitializeComponent();
}
public FindForm(MainForm mfr)
{
InitializeComponent();
mForm = mfr;
}
private void FindBtn_Click(object sender, EventArgs e)
{
try
{
int Position;
StringComparison searchType;
if (MatchCaseChkBx.Checked == true)
{
searchType = StringComparison.Ordinal;
}
else
{
searchType = StringComparison.OrdinalIgnoreCase;
}
Position=
/*here i want to write "Position=mForm.richTextBox1. ...." but the refelection window is not showing the richtextbox1 object after mForm. please help me out ..*/
}

New Topic/Question
Reply




MultiQuote



|