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 41303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:09:35+00:00 2026-05-10T15:09:35+00:00

How do I create a resource that I can reference and use in various

  • 0

How do I create a resource that I can reference and use in various parts of my program easily?

My specific problem is that I have a NotifyIcon that I want to change the icon of depending on the state of the program. A common problem, but one I’ve been struggling with for a long time.

  • 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. 2026-05-10T15:09:35+00:00Added an answer on May 10, 2026 at 3:09 pm

    Well, after searching around and cobbling together various points from around StackOverflow (gee, I love this place already), most of the problems were already past this stage. I did manage to work out an answer to my problem though.

    How to create a resource:

    In my case, I want to create an icon. It’s a similar process, no matter what type of data you want to add as a resource though.

    • Right click the project you want to add a resource to. Do this in the Solution Explorer. Select the ‘Properties’ option from the list.
    • Click the ‘Resources’ tab.
    • The first button along the top of the bar will let you select the type of resource you want to add. It should start on string. We want to add an icon, so click on it and select ‘Icons’ from the list of options.
    • Next, move to the second button, ‘Add Resource’. You can either add a new resource, or if you already have an icon already made, you can add that too. Follow the prompts for whichever option you choose.
    • At this point, you can double click the newly added resource to edit it. Note, resources also show up in the Solution Explorer, and double clicking there is just as effective.

    How to use a resource:

    Great, so we have our new resource and we’re itching to have those lovely changing icons… How do we do that? Well, lucky us, C# makes this exceedingly easy.

    There is a static class called Properties.Resources that gives you access to all your resources, so my code ended up being as simple as:

    paused = !paused; if (paused)     notifyIcon.Icon = Properties.Resources.RedIcon; else     notifyIcon.Icon = Properties.Resources.GreenIcon; 

    Done! Finished! Everything is simple when you know how, isn’t it?

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

Sidebar

Ask A Question

Stats

  • Questions 194k
  • Answers 194k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Oh dear, I think the solution you're looking for is… May 12, 2026 at 6:42 pm
  • Editorial Team
    Editorial Team added an answer I'm dynamically loading different content from db, using ajax You… May 12, 2026 at 6:42 pm
  • Editorial Team
    Editorial Team added an answer It is better to use int x = points.Min(p =>… May 12, 2026 at 6:42 pm

Related Questions

I'm trying to create my own error window for the project I am working
I am using anonymous methods to handle events in a COM object. Once the
(If anything here needs clarification/ more detail please let me know.) I have an
For some reason, we have a script that creates batch files to XCOPY our

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.