D
David Pendrey
Hello all,
I am using the WebBrowser control to browse a webpage containing frames and am having difficulties accessing the 'frames' property of a document object. Bellow is my code and the error recieved:
webAccess.Navigate(URL);
// Wait until document is loaded. This part DOES work
IHTMLDocument2 mDoc = (IHTMLDocument2)(webAccess.Document);
IHTMLFramesCollection2 mFrames = (IHTMLFramesCollection2)(mDoc.frames);
The final line of code returns the error of:
An unhandled exception of type 'System.InvalidCastException' occurred in xxxx.exe
Additional information: No such interface supported
Does anyone out there know of a way to fix this? It would be greatly apreciated.
I am using the WebBrowser control to browse a webpage containing frames and am having difficulties accessing the 'frames' property of a document object. Bellow is my code and the error recieved:
webAccess.Navigate(URL);
// Wait until document is loaded. This part DOES work
IHTMLDocument2 mDoc = (IHTMLDocument2)(webAccess.Document);
IHTMLFramesCollection2 mFrames = (IHTMLFramesCollection2)(mDoc.frames);
The final line of code returns the error of:
An unhandled exception of type 'System.InvalidCastException' occurred in xxxx.exe
Additional information: No such interface supported
Does anyone out there know of a way to fix this? It would be greatly apreciated.