Mondeo Posted September 6, 2007 Posted September 6, 2007 Does anyone know how to instantiate/initialize an active x control in a windows forms app in code. In particular the ax web browser control. It works fine just dropping it onto the form, but I want to create it from scratch in a seperate thread to the UI, I can create it and it appears on the form however when I call its navigate method I get this Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was unhandled Thanks Quote
Administrators PlausiblyDamp Posted September 6, 2007 Administrators Posted September 6, 2007 Bottom line is you shouldn't mess with the UI from any thread other than the UI thread itself. Adding COM threading issues into the problem (like the IE control) is pretty much doomed from the start. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Mondeo Posted September 6, 2007 Author Posted September 6, 2007 Is there a better option? I thought earlier about having 7 web services which all create an indidivual instance of the browser, perform the manipulation and then return the result. Then in my forms app I could simply call the individual web services on different threads. Would that work okay do you think? Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.