Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

BrowserPane.Control is throwing an exception in .Net8 Addin

esalvaJSAU5
Participant

BrowserPane.Control is throwing an exception in .Net8 Addin

esalvaJSAU5
Participant
Participant

I created a custom addin project, This addin has a Test button in the ribbon.

 

The button click event will add a new BrowserPane to the active document. Im using AddByManifest to load the un managed active x control. 

 

During the execution of AddByManifest() the temporary MessageBox in the FormLoad event will shown, which makes me think that the control is loaded properly.

 

But when i try to access the BrowsePane.Control property, It is throwing an exception.


Does anyone have an idea on how to fix this problem ? 

I attached the CustomAddin that i created.

 

Thank you

 

esalvaJSAU5_0-1725946590809.png

 

0 Likes
Reply
Accepted solutions (1)
303 Views
3 Replies
Replies (3)

Michael.Navara
Advisor
Advisor
Accepted solution

I looked into your code and I don't understand why you need to use BrowserPane when the requested content is derived from Windows.Forms.UserControl.

Isn't it better to use DockableWindow? C# sample is available for example here on my GitHub

Method BrowserPanes.AddByManifest is designed for placing ActiveX objects which is not your case in my opinion.

0 Likes

esalvaJSAU5
Participant
Participant

.

0 Likes

esalvaJSAU5
Participant
Participant

Thanks for your reply. It works now. Thank you so much. 

0 Likes