IE BHO

I am writing a BHO for IE and i wish to have certain built in dialog boxes (print, open, add to favs etc...) appear at a specific screen coordinate. I'm trying to use FindWindowEx to locate the print window right now.

FindWindowEx((IntPtr)m_pIWebBrowser2.HWND, nullval,"Internet Explorer_TridentDlgFrame","Print Preview")

i used spy++ to find the print dialog box and traced it's parentage back to the IE window thru the "print preview" window. i used spy++ to get the class name and user name of this window.after finding the hwnd of that window i used FindWindowEx again to find the actuall print dialog box's hwnd

FindWindowEx(hwnd, nullval,"#32770 (Dialog)","Print");

i then used setwindowpos to try to move the window.

nothing happened on debugging i found that the hwnd of the first call to FindWindowEx was incorrect i beleive it has to do with the delay time (about 1 sec) for the print dialog box to show itself. Thread.Sleep after calling the dialog box only causes the box to take longer to appear.

not sure if the delay is the issue or how to fix it plz help.

[1593 byte] By [Jonesj3599] at [2008-1-10]

Internet Explorer Development Hot Topic

Internet Explorer Development New Topic