.NET Custom control toolbox icon 
Author Message
 .NET Custom control toolbox icon

Hello All,
This is the second time I am posting this. Anyone got toolbox
image for a custom control working for MC++?

I cannot load the icons/bitmap directly from hard disk, it must
be embedded somewhere in the resource file - it works easily
with C#/VB.NET!

Any  hint?

Best regards,
Paul.



Sun, 23 Oct 2005 20:21:57 GMT  
 .NET Custom control toolbox icon
Hi Paul,

In order to add a specific toolbox for the NET control created using Managed
C++ you have to add a bitmap with the name that is the same as your control
class full name:
for example:
You have a namespace ControlNamespace and class MyControl that will be
instantiated when user selects you control from the toolbox.
1) You have to create a bitmap 16x16 and 16 color with name
"ControlNamespace.MyControl.bmp" add this file to the project.
2) Go to the Project Properties/Linker/Input, add bitmap file name with
correct path under "Embed Managed Resource File" entry.
3) Recompile project and make sure that you are using new version of the
control when adding it to the toolbox using Customize Toolbox

Regards,
Andrew


Quote:
> Hello All,
> This is the second time I am posting this. Anyone got toolbox
> image for a custom control working for MC++?

> I cannot load the icons/bitmap directly from hard disk, it must
> be embedded somewhere in the resource file - it works easily
> with C#/VB.NET!

> Any  hint?

> Best regards,
> Paul.



Tue, 25 Oct 2005 05:31:16 GMT  
 .NET Custom control toolbox icon
Hello Andrew,
Thanks so much, it works perfectly now. I never knew I had
to append the namespace to the bitmap name.

Best regards,
Paul.


Quote:
> Hi Paul,

> In order to add a specific toolbox for the NET control created using
Managed
> C++ you have to add a bitmap with the name that is the same as your
control
> class full name:
> for example:
> You have a namespace ControlNamespace and class MyControl that will be
> instantiated when user selects you control from the toolbox.
> 1) You have to create a bitmap 16x16 and 16 color with name
> "ControlNamespace.MyControl.bmp" add this file to the project.
> 2) Go to the Project Properties/Linker/Input, add bitmap file name with
> correct path under "Embed Managed Resource File" entry.
> 3) Recompile project and make sure that you are using new version of the
> control when adding it to the toolbox using Customize Toolbox

> Regards,
> Andrew



> > Hello All,
> > This is the second time I am posting this. Anyone got toolbox
> > image for a custom control working for MC++?

> > I cannot load the icons/bitmap directly from hard disk, it must
> > be embedded somewhere in the resource file - it works easily
> > with C#/VB.NET!

> > Any  hint?

> > Best regards,
> > Paul.



Tue, 25 Oct 2005 21:04:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IDE Toolbox support for custom wrapped ActiveX controls

2. Cant get my Custom Web Control onto toolbox!!!

3. Adding Custom Controls To Dialog Editor Toolbox

4. Toolbox Image for Custom Control

5. Remove custom control icon from controls palette

6. Professional ASP.NET Server Controls - Building Custom Controls with C#

7. MC++ Toolbox Icon - HELP!!!! (X-Post)

8. Building a custom NET control using Managed Extensions

9. Can not add a custom .NET control on the form in design-time

10. Custom controls and VC.NET dialog editor

11. ASP.NET user control custom designer question

12. Custom controls in ASP.NET

 

 
Powered by phpBB® Forum Software