RE: Bitmap displayed in ToolBox of Visual Studio for a control
- From: v-lliu@xxxxxxxxxxxxxxxxxxxx (Linda Liu [MSFT])
- Date: Mon, 11 Dec 2006 07:49:46 GMT
Hi Charles,
I performed a test based on your description and did see the same thing as
you did.
I create a Winforms application project and add a component to the project.
I add a ToolboxBitmapAttribute to the component. The following is the code
of the component.
[ToolboxBitmap(typeof(Button))]
public partial class class1:Component
{
...
}
After I build the project, a tab with the same name as the project is
populated automatically in the Toolbox and the component appears under this
tab. The bitmap next to the component is the default bitmap.
I also performed a test adding the component to the Toolbox manually, and
see the bitmap next to the component is correct at this time. It means that
the bitmap specified by the ToolboxBitmapAttribute isn't shown in
auto-generated items.
FYI, to do this, right-click on the Toolbox and select 'Choose Items'. In
the 'Choose Toolbox Items' dialog, switch to the '.NET Framework
Components' tab page and click the 'Browse' button to specify the assembly
containing the component. After I select the assembly, the component name
appears in the list box and I select the checkbox before the component.
Press OK button to close the dialog. The new added component has a correct
bitmap.
I have searched in our inner database. I find that this behavior is by
design for performance reasons. The relevant documentation should have
pointed it out. A good news is that our product team has considered this as
they prepare the next release of the documentation.
We are sorry for the inconvenience the documentation brings to you!
Hope this helps.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Bitmap displayed in ToolBox of Visual Studio for a control
- From: Charles Zhang
- Re: Bitmap displayed in ToolBox of Visual Studio for a control
- References:
- Bitmap displayed in ToolBox of Visual Studio for a control
- From: Charles Zhang
- Bitmap displayed in ToolBox of Visual Studio for a control
- Prev by Date: Re: Signing executable files programatically
- Next by Date: how to install .NET Framework 2.0 unattended using VS.NET Setup Project Template
- Previous by thread: Bitmap displayed in ToolBox of Visual Studio for a control
- Next by thread: Re: Bitmap displayed in ToolBox of Visual Studio for a control
- Index(es):
Loading