Select Resource Dialog Box

I have some usability issues with the Select Resource dialog box that must be my lack of understanding as to what it is used for.

I have an ico file in the resource file attached to the assembly -- which shows up in the designer just great. We're using ICO format because we have difficulty with transparency - it seems like we aren't the only ones having problems in that area.

In my assembly resx file I have added an existing ico resource. It shows up all nice and pretty in the resource designer.

So I have a button, and I bring up the property grid, highlight the Image property and click the ... I get a "Select Resource Dialog"

In the Select Resource dialog when I choose "Project Resource File" and the right resx file it shows no resources in the list box. I can't figure out how to get resources in a resx file to show up there.

If I click import, and select the ico it shows up in the select resource list box, I select it... click Import, then OK -- and I have no image on my control, and no icons showing up in any resource files. As near as I can tell at this point I have imported the icon file five times (as it briefly flashes that it's name is XXX5.ico but I cannot find this resource anywhere using a designer.... oh wait there it is in my solution under the "resources" folder!! So what was I picking when I picked a resx file in the combo box

So I deleted them all, thinking I already had this resource embedded in my resource file. Surprise Surprise one of the ico files WAS in my ResX file (now how was I supposed to know that ) and I got a compile error.

And after all that -- no image on my button :-(

Programatically putting the image on the button from the icon in the resource file is a no brainer: Control.Image = ResourceFile.ResourceName.ToBitmap(); but would someone please explain to me what I missed here Specifically what is the Select Resource dialog box supposed to do I've read the help topic a few dozen times and I just don't see what this dialog has to do with a resx file as it's clearly putting the imported resources elsewhere.

Regards




Answer this question

Select Resource Dialog Box

  • jcollomosse

    Ah-ha! I'm running SP1 Beta so it's not fixed.

    Ended up manually correcting the resource XML to get everything OK.

    Thanks for the help!



  • developer810

    The Select Resource dialog is looking for a bitmap, not an icon. That's why you don see the icon you added to the resources. When you click the Import button, it will turn an icon file you select into a bitmap resource. Surprisingly, with the correct transparency key. The IDE indeed gets pretty confused when you add the same icon twice, once through the Resource designer and again through Select Resource. I don't have access right now to the PC with the SP1 beta installed to see if this got fixed...


  • Select Resource Dialog Box