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

  • Home
  • SEARCH
  • 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 8790121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:34:11+00:00 2026-06-13T22:34:11+00:00

I have a Library project which i use it as a portable area project

  • 0

I have a Library project which i use it as a portable area project using MvcContrib.

Inside the Library project i am accessing a local image from code behind.

string imagePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, string.Format("Controls\\images\\expander_opened_hover.png"));
using (Bitmap bmp = (Bitmap)Bitmap.FromFile(imagePath))
{
   // do somthing with this image
}

The code runs on the Library project, but when i am accessing the same function from a “host” project, i get an error that the file was not found. The file is set as Embedded Resource in the Library project, but it doesn’t exists in the host project.

How can i set the path so it will find the embedded icon instead?

  • 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-06-13T22:34:12+00:00Added an answer on June 13, 2026 at 10:34 pm

    May be like this:

    var assembly = Assembly.GetExecutingAssembly();
    var imageStream = _assembly.GetManifestResourceStream(
            "[AssemblyNamespace].Controls.images.expander_opened_hover.png");
    var bitmap = new Bitmap(imageStream)
    

    have a look here: http://support.microsoft.com/kb/319292

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

Sidebar

Related Questions

I have a class, which is part of a code library project that was
I have a library which i want to use in my iphone project which
I have a library project which includes a object (.o) file. I have the
I have a class library project which contains some content files configured with the
I am developing an android app in which I have included a library project,
I have a project which uses a large library residing in its own repository.
I have composite project which contains: C++ library for Linux/Windows, C++/CLI library based on
I have written a Flex Library project - a .swc file - which is
I am creating a Control Library project. I have some Cursor files which i
I have a Windows Forms project in Visual Studio 2008, which references a library

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.