There are a lot of possible dialogs. Standard ones are MessageBox and the shell dialogs like OpenFileDialog, PrintDialog, ColorDialog, etcetera. A lots and lots of non-standard ones, the kind that a programmer that uses native code to write a Windows program creates with the resource editor. Displayed by the DialogBox() winapi function.
You'll need to find out more about the dialog window, use the Spy++ utility. If it is a common dialog then you'll see that every control on the window has an ID. You find these back at runtime by pinvoking GetDlgItem(). Possibly needing EnumChildWindows() if they are nested inside another child window. If the function fails, returns IntPtr.Zero, then you know you don't have the dialog that you are looking for. You should also pinvoke GetClassName() to double-check that it is the kind of control you hope to find.
Beware that it can never be 100% accurate, programmers tend to pick IDs that are very common. Like simply numbering them consecutively, starting at 1. Doing this at the right time, when it is very likely that a particular dialog is shown, is very important.
And beware that Microsoft can easily break your code. They don't promise to keep dialogs the same in the next version of Internet Explorer.
And beware, last but not least, that programmers tend to be interested in this because they want to tinker with the file download confirmation prompt. Poking the path name and clicking the OK button automatically. A very attractive target for malware of course, they've built in counter-measures to defeat this easy target. Enhanced protected mode, enabled in later IE versions, is another counter-measure that will give you a throbbing headache.