I use a WebBrowser control and it’s find functionality:
private void findToolStripMenuItem_Click(object sender, EventArgs e)
{
webBrowser1.Select();
SendKeys.Send("^f");
}
Which works fine. Only problem that there is a case when user can make WebBrowser unvisible to perform some other tasks:
webBrowser1.Visible = false;
But Find window remains visible. Any suggestions?
Thank you.
To close, try this
There is no easy/direct way to control the Find dialog. One way to close the Find dialog is by sending “ESCAPE” to the dialog when it has focus. If you send “^f” prior to sending “ESCAPE”, that will force the find dialog to get focus.