473,320 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ToolboxBitmap control problem

Hi All,

I cannot made visible the toolbox bitmap for my controls.
I did the following:

- Namespace : foo
- Assembly: foo.dll
- Toolbox bitmap stored in subdirectory Resources. Resource bitmap defined
as embedded resource: MyControl.bmp
- Then the control toolboxbitmap attribute is defined like this:

[ToolboxBitmap(typeof(MyControl), "foo.Resources.MyControl.bmp")]
public class MyControl : System.ComponentModel.Component
Anyone have an idea ?

Thanks
Nov 17 '05 #1
1 8871
"Luis Arvayo" <am**********@prodigy.net.mx> wrote in message
news:Ot**************@TK2MSFTNGP14.phx.gbl...
Hi All,

I cannot made visible the toolbox bitmap for my controls.
I did the following:

- Namespace : foo
- Assembly: foo.dll
- Toolbox bitmap stored in subdirectory Resources. Resource bitmap defined
as embedded resource: MyControl.bmp
- Then the control toolboxbitmap attribute is defined like this:

[ToolboxBitmap(typeof(MyControl), "foo.Resources.MyControl.bmp")]
public class MyControl : System.ComponentModel.Component
Anyone have an idea ?

Thanks


I just did my first user control the other day and got the ToolboxBitmap to
work like this:

- Add MyControl.bmp to the project, in the same directory as MyControl.cs.
- Set the Build Action for MyControl.bmp to "Embedded Resource"
- Add the following attribute to the MyControl class:
[ToolboxBitmap(typeof(MyControl))]

Worked like a champ. It may be possible to do it another way but like I
said this was my first go at a user control so I'm no expert.

Good luck.

CVD
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jean-dot-paul-at-opelwilly-dot-com | last post by:
Hello, Can I use the ToolboxBitmap from the inherted Control to show up in my toolbox and if so how? Greetings Jean Paul
0
by: Adam Dockter | last post by:
I want my custom controls to have customer bitmaps but I can't get them to work if I try to pull the icon from a resource file. I know that I can add the icon to the project as an embedded...
1
by: Simon | last post by:
Hi How do I to change toolbox bitmap of my custom control using ToolboxBitmap in MC++ ? Thanks in advance
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: nicolas.hilaire | last post by:
Hi all, i'm creating an User Control (that is working). I would like to see my own image for this control, in the toolbox. Then, i'm using ToolboxBitmap namespace testUserControl { ...
1
by: Jeff | last post by:
Hello, I have developed a library of controls but for the life of me cannot get ToolboxBitmapAttribute to work -- my image simply will not display in the toolbox of any project using my...
10
by: MyndPhlyp | last post by:
(Second posting attempt) I have been through tons of old postings, several web sites, books, and even tried consulting a psychic but nothing is yielding the majik answer. I'm using VB '05...
0
by: John | last post by:
I've created a component in VS.NET 2003 and I'm having a hard time getting my bitmap to show up in the Designer Toolbox in Visual Studio. I have designed an .ico file and have included the...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.