<p>If I were to want to create a nice looking widget to stay running in the background with a small memory footprint, where would I start building the windows application.  It's goal is to keep an updated list of items off of a web service. Similar to an RSS reader.</p>

<p>note: The data layer will be connecting through REST, which I already have a C# dll, that I assume will not affect the footprint too much.</p>

<p>Obviously i would like to use a nice WPF project, but the ~60,000k initial size is too big.</p>

<p>*C# Forms application is about ~20,000k</p>

<p>*C++ Forms ~16,000k</p>

<p>*CLR or MFC much smaller, under 5</p>

<p>Is there a way to strip down the WPF or Forms? and if im stuck using CLR or MFC what would be the easiest way to make it pretty. (my experience with MFC is making very award forms)</p>

<p><em>Update: Clarification</em> The above sizes, are the memory being used as the process is ran, not the executable. </p>

[{'answer_id': 79729, 'author': 'Leon Bambrick', 'author_id': 49, 'author_profile': 'https://Stackoverflow.com/users/49', 'pm_score': 0, 'selected': False, 'text': '<p>If you "already have a C# dll" you\'re intending to use then there must be .net already installed on the target machine.</p>\n\n<p>In that case, a C# win forms app need not be anywhere near 20 meg. The smallest hello world type win form would be 7 kilobytes.</p>\n'}, {'answer_id': 79775, 'author': 'Thomas', 'author_id': 14637, 'author_profile': 'https://Stackoverflow.com/users/14637', 'pm_score': 0, 'selected': False, 'text': "<p>If it must really be as small as possible, use plain C and talk to the Windows API directly.</p>\n\n<p>However, since you're going to have the CLR loaded anyway because of the .NET dll, I would opt for something less painful and simply use C# for the UI as well.</p>\n"}, {'answer_id': 79859, 'author': 'Leon Bambrick', 'author_id': 49, 'author_profile': 'https://Stackoverflow.com/users/49', 'pm_score': 3, 'selected': True, 'text': '<p>re:</p>\n\n<blockquote>\n  <p>Update: Clarification The above sizes,\n  are the memory being used as the\n  process is ran,  not the executable.</p>\n</blockquote>\n\n<p>Okay, when you run a tiny C# Win Forms app, the smallest amount of RAM that is reserved for it is around 2 meg, maybe 4 meg. This is just a working set that it creates. It\'s not actively using all of this memory, or anything like it. It just reserves that much space up front so it doesn\'t have to do long/slow/expensive requests for more memory later as needed.</p>\n\n<p>Reserving a smaller size upfront is likely to be a false optimization.</p>\n\n<p>(You can reduce the working set with a pinvoke call if it really matters. see <a href="http://www.pinvoke.net/default.aspx/kernel32.SetProcessWorkingSetSize" rel="nofollow noreferrer">pinvoke for \'set process working set size\'</a> )</p>\n'}, {'answer_id': 1511332, 'author': 'markti', 'author_id': 79749, 'author_profile': 'https://Stackoverflow.com/users/79749', 'pm_score': 0, 'selected': False, 'text': '<p>Why not use Silverlight? Here is an <a href="http://blogs.msdn.com/gavingear/archive/2007/06/07/how-to-create-an-ink-enabled-sidebar-gadget-using-silverlight.aspx" rel="nofollow noreferrer">article</a> that talks about doing just that.</p>\n'}]
['https://Stackoverflow.com/questions/79356', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/14753/']