|
Hello all,
I have extended a combo box and want to use the ToolBoxBitMapAttribute to display an icon in the ToolKit. I would like to create an icon based on the combo box since it inherits from it, but I can't find the icon. Where are they kept in visual studio and how do I extract it? Thanks in advance for any ideas and/or suggestions! |
| j2associates Tuesday, October 06, 2009 1:45 AM |
Hi j2associates, Thank you for coming back. The ComboBox icon has been built into the .NET assembly as embedded resource. You cannot find the bmp file directly in your local disk. I have used Reflector to retrieve it. Please download the file here . Wish you good luck. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at EMAIL REMOVED
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Kira Qian Wednesday, October 07, 2009 1:59 AM |
You don't need to extract Images. You can use ToolBoxBitMapAttribute directly like below.
[
ToolboxBitmap (typeof(ComboBox))]
Note:After changing attribute changes may not directly effect directly, you might need to remove your control from toolbox and add by selecting Choose Items again. - Edited byTamer OzMVPTuesday, October 06, 2009 3:54 AMNote added
- Proposed As Answer byTamer OzMVPTuesday, October 06, 2009 8:04 AM
- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Tamer Oz Tuesday, October 06, 2009 3:52 AM |
Hi j2associates, You can use Reflector to view the source of .NET controls as well as their resource. You can download it from here. http://www.red-gate.com/products/reflector/ To view the resource and save it, you can see the screen shot. Notice: These resources are used by Microsoft .NET. Although you can use this way to get them, please do not use them for any business purpose. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Kira Qian Thursday, October 08, 2009 2:38 AM |
You don't need to extract Images. You can use ToolBoxBitMapAttribute directly like below.
[
ToolboxBitmap (typeof(ComboBox))]
Note:After changing attribute changes may not directly effect directly, you might need to remove your control from toolbox and add by selecting Choose Items again. - Edited byTamer OzMVPTuesday, October 06, 2009 3:54 AMNote added
- Proposed As Answer byTamer OzMVPTuesday, October 06, 2009 8:04 AM
- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Tamer Oz Tuesday, October 06, 2009 3:52 AM |
Hi j2associates, I think Tamer’s answer is correct. You can take look at this KB for more information about that. http://support.microsoft.com/kb/311315 Turn to “ Use an Image from a System Control ” paragraph, you can see it doesn’t require you to find the icon of system one. If you have any problem with it, please feel free to tell us. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at EMAIL REMOVED
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! |
| Kira Qian Tuesday, October 06, 2009 8:03 AM |
Thanks to both of you for your very helpful responses! However, I want to tweak the icon a little bit. Because the combobox in question displays the color picker when dropped, I would like to add a little splotch of color to the icon. That is why I need the actual icon. Thanks again for your help! |
| j2associates Tuesday, October 06, 2009 10:49 PM |
Hi j2associates, Thank you for coming back. The ComboBox icon has been built into the .NET assembly as embedded resource. You cannot find the bmp file directly in your local disk. I have used Reflector to retrieve it. Please download the file here . Wish you good luck. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at EMAIL REMOVED
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Kira Qian Wednesday, October 07, 2009 1:59 AM |
Hello Kira,
That was exactly what was needed. Would it be possible to get the Button and GroupBox icons also? |
| j2associates Wednesday, October 07, 2009 9:53 AM |
Hi j2associates, You can use Reflector to view the source of .NET controls as well as their resource. You can download it from here. http://www.red-gate.com/products/reflector/ To view the resource and save it, you can see the screen shot. Notice: These resources are used by Microsoft .NET. Although you can use this way to get them, please do not use them for any business purpose. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- Marked As Answer byKira QianMSFT, Moderator4 hours 6 minutes ago
-
|
| Kira Qian Thursday, October 08, 2009 2:38 AM |
Thanks Kira! So are you saying that if an extended control was created for commercial use, the only icon that could be used with ToolBoxBitMap is the original standard icon, say a ComboBox or TextBox? |
| j2associates 11 hours 36 minutes ago |
Hi j2associates, It doesn’t matter if you just use it for the controls. What I mean is if you retrieve any resource (especially Microsoft Logo pictures) from Microsoft Windows and use them in your business software, you will need to pay attention to the copyright. I have given you a way to retrieve the image from .NET assembly. If you do not use this way to retrieve any sensitive resource, you can take it easy to use. Wish you good luck. Sincerely, Kira Qian Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! |
| Kira Qian 4 hours 7 minutes ago |