Click here to Skip to main content
16,021,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing an application where I need to edit a Notepad file. I did the standard menus of the Notepad, and when some of them are clicked (Find, Find Next, Replace, Go To) they call dialogs that display textboxes and buttons to perform the selected task, such as Notepad.
When I click the Find menu, the Find dialog is called, it has the same buttons that the dialog Find of the Notepad. So when I type some text and click the Find Next button a routine that locates the text will be called, and found text will be selected in the text box containing the text of the Notepad in which I am using. I want that after the text was selected the dialog remains displayed, and when I click the Find Next button again, the next text to be selected without the dialog loses focus, and I can click on the text box, which contains the text of the Notepad. Just like the Windows Notepad.
I know two ways to call the dialog, the methods show () and ShowDialog (), but with none of them I can do what I want.
Does anyone know how I can do this, thank you in advance.
Posted

1 solution

I'm not sure exactly what you mean, but would the TopMost property for your find dialog do what you need? It will keep the dialog form on top, even if it loses focus.
 
Share this answer
 
Comments
fcronin 5-Aug-11 20:06pm    
My 5.
Edson Rodrigues da Silva 5-Aug-11 20:14pm    
That's exactly what I needed, thank you.
walterhevedeich 6-Aug-11 0:37am    
Voted 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900