Hi,
The SeachAndReplaceDialog returns an error it the txtFind is blank and the user click OK
Please change the code.
This way it works fine, if you want add a message box.
```
private void BtnOkClick(object sender, EventArgs e)
{
if ((txtFind.Text != ""))
{
_find = txtFind.Text;
_replace = txtReplace.Text;
DialogResult = DialogResult.OK;
}
else
{
return;
}
}
```
The SeachAndReplaceDialog returns an error it the txtFind is blank and the user click OK
Please change the code.
This way it works fine, if you want add a message box.
```
private void BtnOkClick(object sender, EventArgs e)
{
if ((txtFind.Text != ""))
{
_find = txtFind.Text;
_replace = txtReplace.Text;
DialogResult = DialogResult.OK;
}
else
{
return;
}
}
```