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

The exception code doesn't tell me much. But most of the time if I run into trouble it has to do with the icons. You could try to run the code without loading the icons. Just to make sure they are not the problem. In your code that would mean removing the following lines:

        MsgBox("12")
        AddHandler _settingsButton.OnExecute, AddressOf MyButton_OnExecute
        MsgBox("13")
        _settingsButton.StandardIcon = PictureDispConverter.ToIPictureDisp(My.Resources.CJSC_icon_16)
        MsgBox("14")
        _settingsButton.LargeIcon = PictureDispConverter.ToIPictureDisp(My.Resources.CJSC_icon_32)
        MsgBox("15")

(line 27 to 33)

If the addin the addin loads without those lines you know the icons are the problem. In that case, you could try using my images (https://github.com/hjalte79/MyILogicAddin/tree/master/MyILogicAddin/Recources) as a test.

 

Just another tip: Instead of using the msg boxes you could add breakpoints to your and step through the code. Have a look here: https://learn.microsoft.com/en-us/visualstudio/debugger/debugger-feature-tour?view=vs-2022

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com