0

I'm setting the HKEY_CLASSES_ROOT\.ext\DefaultIcon to the path of my application and it works...for the most part.

        // create the HKEY_CLASSES_ROOT\extension
    RegistryKey k = Registry.ClassesRoot.CreateSubKey(".spr"); 
    k.SetValue("", "SpaceRead"); // set the default to the program name
    RegistryKey di = k.CreateSubKey("DefaultIcon");
    di.SetValue("", Application.ExecutablePath); 
    di.Close();
    k.Close();

My problem is that my icon is showing up 'inside a white page' instead of only showing my icon (and losing the page)

here's an example. The first icon is mine, the second one is what I want.

My icon vs a good one

My .ico file has all the standard resolutions in it, but I don't think that's the problem since even small icon views show the 'page' background.

Is there some custom icon rendering going on that I don't know about?

BTW, this is a Windows 7 x64 machine.

Iunknown
  • 347
  • 1
  • 2
  • 16
  • Is there a reason you're trying to set the icon, and not just setting your exe to be the default handler for that file type? – Ryan Bemrose Sep 08 '14 at 02:23
  • this answer may help you.. http://stackoverflow.com/a/69826/3761928 – Shell Sep 08 '14 at 02:24
  • Don't know if this is it, but also make sure that your exe is exposing a 256x256 icon. Win7 may be failing at trying to scale up a smaller icon. – Ryan Bemrose Sep 08 '14 at 02:29
  • It seems that every question I write gets voted down. I must really suck at asking questions. I'm going to try to edit it to make it more clear – Iunknown Sep 08 '14 at 22:33

0 Answers0