2

I have been trying to find a way to add a notify Icon to an app I am writing in WPF C#. I have found many links to WPF NotifyIcon and while it does do what I want,5 its adds tens of megs to the memory footprint of a 5-8 meg footprint app. It is a bit overkill.

I have also found many tutorials on how to use System.Window.Form to do this and most of them just say to reference them (I assume this means using the 'using' directive). When I try it gives me and error saying that that "forms" doesn't exist in the namespace "Windows". I thought maybe this was outdated and depreciated but I came across the MSDN Documentation for NotifyIcon and it looks current to 4.5.

Is there another way I should be implementing this? Any help would be appreciated.

Thanks

2
  • What solution did you choose for implenting the icon finally? Commented Aug 5, 2015 at 22:56
  • @sprinter252 I ended up using David Anson's "MinimizeToTray" from his blog at dlaa.me/blog/post/9889700 with the help of SimCard. Worked like a charm and added almost nothing to the app. Commented Aug 6, 2015 at 0:22

1 Answer 1

3

Assuming you are using Visual Studio:

In the Solution Explorer expand your project and right click on "References"

Go to "Add Reference..."

enter image description here

In the Reference Manager, go to Assemblies -> Framework.

Scroll to System.Windows.Forms and check the box to include the assembly in your project.

enter image description here

You should now be able to add packages under the Windows.Forms assembly.

Sign up to request clarification or add additional context in comments.

2 Comments

Wow with screen shots and all. Thank you very much, exactly what I was looking for. Works like a charm and is slim as heck.
Glad I could help! Don't forget to mark this as the answer if you thought it answered your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.