Index: bugs.txt
===================================================================
--- bugs.txt	(revision 11)
+++ bugs.txt	(revision 12)
@@ -1,3 +1,2 @@
 Known bugs:
-- When the program is minimized to tray, double clicking the icon only restores it to the task bar
 - Window flickers when blocks are added (problem with repainting?)
\ No newline at end of file
Index: ui.cpp
===================================================================
--- ui.cpp	(revision 11)
+++ ui.cpp	(revision 12)
@@ -3002,6 +3002,7 @@
 
 void CBitcoinTBIcon::Restore() {
     pframeMain->Show();
+    pframeMain->Iconize(false);
     pframeMain->Raise();
     if (!alwaysShowTrayIcon)
     	Hide();
@@ -3296,6 +3297,9 @@
 
     taskBarIcon = new CBitcoinTBIcon();
     ApplyUISettings();
+    if (mapArgs.count("/min") && minimizeToTray) {
+    	pframeMain->Iconize(true);
+    }
 
     return true;
 }
@@ -3408,6 +3412,7 @@
 			IPersistFile* ppf = NULL;
 			// Set the path to the shortcut target
 			psl->SetPath(exePath);
+			psl->SetArguments("/min");
 			// Query IShellLink for the IPersistFile interface for
 			// saving the shortcut in persistent storage.
 			hres = psl->QueryInterface(IID_IPersistFile,
