I’ve been working on the Find, Find Next, Find Previous, and Replace/Replace All commands for well over a month now. There are lots of challenges to implementing this functionality, especially for a non-programmer such as myself. But there are also some important challenges related to implementing this functionality in the same manner as the original Notepad. And I’ve found myself butting up against my own limitations again and again as a result.
For an inkling to what I mean, consider an earlier issue I had in trying to duplicate the dialog box that Notepad provides when you go to exit the application with an unsaved document. My original assumption was that this dialog was created specifically for Notepad, and that I would have to manually create a reasonable facsimile of it (a tedious task). But as readers informed me, it’s actually a Task Dialog, a UI that was first implemented for Windows Vista. Task Dialogs are not natively supported by Windows Forms for some reason, though Microsoft had at one time made them available via a separate download that is no longer officially available. So my eventual workaround was to simply use a Message Box; it doesn’t look exactly like the dialog that the real Notepad uses, but it is at least a clean, native UI, and it provides exactly the same functionality (in this case). Problem solved.