none
Is the resource compiler still needed in Visual Studio 2015? RRS feed

  • Question

  • Hi,

    A couple of years ago I created an ActiveX control using C# (a simple graphical audio waveform display and analysis tool) for use in Excel. That was with VS2010 at the time, based on some code I found on the web (I am by no means professional programmer). 

    It had a simple bitmap resource included so that the control showed with its custom icon when added to the Excel (controls) toolbox. This resource was compiled with the rc.exe resource compiler that came with the v7.1A Windows SDK.

    Now, I tried to recompile the thing with Visual Studio 2015 (with VS2010 removed from my system) but I can no longer find rc.exe. I tried to install SDK 7.1 again from the MS web, but it does not install. I currently have .NET 4.6 and .NET 4.6 installed, but I can't seem to install .NET 4.0 anymore.

    My question is: is the resource compiler still needed with Visual Studio 2015?

    Thanks!


    • Edited by Diracsbracket Thursday, August 4, 2016 2:40 AM typo
    • Moved by CoolDadTx Thursday, August 4, 2016 2:13 PM Office related
    Thursday, August 4, 2016 2:39 AM

Answers

  • How stupid of me...

    I just had to go to File -> Options -> Trust Center -> Trust Center Settings -> ActiveX Settings.

    I had "Disable all controls without notification" checked... 

    I changed this to the next level (Prompt me before enabling Unsafe ...) and that solved it. I can insert the control now.!

    • Proposed as answer by David_JunFeng Thursday, August 11, 2016 1:54 PM
    • Marked as answer by David_JunFeng Tuesday, August 16, 2016 2:02 PM
    Thursday, August 4, 2016 2:13 PM

All replies

  • I think if you right click your project in Solution Explorer -> Properties -> click "Resources" on the left pane -> select "Add Resource" then "Add existing file..." on the top of right pane, you can include files in your project to the resource file.

    The created .resx file has "Build Action" as "Embedded Resource", and "Custom Tool" as "ResXFileCodeGenerator" so the compiler will know how to handle it.

    • Edited by cheong00 Thursday, August 4, 2016 3:26 AM
    Thursday, August 4, 2016 3:21 AM
  • Hi cheong00,

    Thanks for your kind reply.

    Apparently, the ActiveX DLL built correctly and also the automatic registration of the component by Visual Studio succeeds correctly apparently, because I can add the component (with the correct icon) to the Excel VBA toolbox in the Excel VBA IDE. However, upon inserting it in my user form I get the error

    The subject is not trusted for the specified action.

    How can I make this ActiveX DLL be trusted? Do I really need to digitally sign it although I am the source of it, and therefore trust it?

    If you know the answer, I would be grateful for your kind reply!

    Thursday, August 4, 2016 1:40 PM
  • How stupid of me...

    I just had to go to File -> Options -> Trust Center -> Trust Center Settings -> ActiveX Settings.

    I had "Disable all controls without notification" checked... 

    I changed this to the next level (Prompt me before enabling Unsafe ...) and that solved it. I can insert the control now.!

    • Proposed as answer by David_JunFeng Thursday, August 11, 2016 1:54 PM
    • Marked as answer by David_JunFeng Tuesday, August 16, 2016 2:02 PM
    Thursday, August 4, 2016 2:13 PM
  • Hi Diracsbracket,

    According to your description, it seems that you have resolved this issue by yourself. If so, thanks for your sharing your solution, that will help other community member when they have same issue.

    Thanks for your understanding.
    Friday, August 5, 2016 2:32 AM