ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment

后端 未结 4 2049
予麋鹿
予麋鹿 2021-01-22 20:54

I am getting this error when i try to show a form with an webbrowser in it.

ActiveX control \'8856f961-340a-11d0-a96b-00c04fd705a2\' cannot be instantiated becau

4条回答
  •  悲哀的现实
    2021-01-22 21:38

    Just searched myself silly, since I am not really doing any threading myself, but I found a solution to my problem with the same error.

    Anyway, you also will get this error: "ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment" when you try to use an object on a form (with the WebBrowser Control on it) when that form has not been created yet.

    fyi

提交回复
热议问题