Toolbox Icon for CustomControl

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
 
P

programcounter

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
 
T

Tim Wilson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top