Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6554985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:45:53+00:00 2026-05-25T12:45:53+00:00

I have this problem: in my test.dll I have a usercontrol with a button

  • 0

I have this problem:
in my test.dll I have a usercontrol with a button with an icon png, my test.exe contains the usercontrol in test.dll and everything works fine.
after I use a ilmerge to create testMerged.exe like this:

ilmerge /wildcards /t:winexe /out:$(TargetDir)testMerged.exe
$(TargetPath) $(TargetDir)test.dll

and the program works fine but the button doesn’t have the icon…. how can I solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:45:53+00:00Added an answer on May 25, 2026 at 12:45 pm

    Here is how I got it to work:

    Class Library

    • Create new class library
    • Create user control
    • Add button to user control
    • In project properties, add image resource (existing png file)
    • Set the Build Action on the png file to Embedded Resource
    • Set the button image using

      this.button1.Image = global::ClassLibrary1.Properties.Resources.MyImage;

    Win forms

    • Create new winform project
    • Add reference to the class library project
    • Rebuild (to get the user control in the toolbox)
    • Add user control to the form
    • Set the post Build action to

      “c:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe” /t:winexe /targetPlatform:v2 /out:$(TargetDir)testMerged.exe $(TargetPath) $(TargetDir)ClassLibrary1.dll

    • Rebuild

    • Run the testMerged.exe

    My result:

    [Not enough rep to post an image 🙁 ]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem: if i run this test in NUnit ,it works Board
This is an erlang problem, it seems. I have this code to test the
I have this problem containing some inequations and requirement to minimize a value. After
To test this problem I have written a minimal windows application. If I force
I have written a C DLL and some C# code to test including this
i'm having a problem running an integration test through Gallio. The test works fine
I have this problem I'm hoping someone knows the answer to. I have an
I have this problem where I open Visual Studio and the internal windows are
i have this problem to find a particular xml node l have post this
I have this problem I've been trying to tackle for a while. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.