Toolbox Icon for CustomControl

  • Thread starter Thread starter programcounter
  • Start date Start date
P

programcounter

Hello,

I have written a custom-control for SmartDeviceApplications.

Now I will set a specific ToolboxIcon if my custom-control is added to
the VS.Net-ToolBox.

Is it possible to change the appearance of the ToolBoxIcon for my
custom-control??????

Thanks
 
Hello Tim,

the ToolboxBitmapAttribute is located in the .NET-Framework-Library
"System.Drawing.dll". In my SmartDeviceApplication-Control I have
referenced the "System.Drawing.dll" which is defined in
CompactFramework and there isn´t a ToolBoxBitmap- or a
ToolboxBitmapAttribute-class.
And I need the DLL from the CompactFramework
What can I do?????

Thanks and greetings
programcounter
 
In the current version of the CF, you'll need to create two different
assemblies - one for run-time and one for design-time. See the article
linked below.
http://msdn.microsoft.com/library/d...ngcustomcontrolforsmartdeviceapplications.asp

In fact, you can probably omit the ToolboxBitmapAttribute altogether. When
you're building the design-time control through the command prompt, just
ensure that the bitmap is named the same as the fully qualified name of the
control, and include the following line in the build command. Of course, the
"MyNamespace.Control" portion should be named the same as your namespace and
control.

/res:MyNamespace.Control.bmp
 
Back
Top