Solved

ToolboxBitmap not working for me

Posted on 2006-10-30
6
742 Views
Last Modified: 2008-01-09
Opening this question again:

I am trying to set the toolbox icon for a web control, but can't seem to get it to work.  I have already referenced this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskProvidingToolboxBitmapForYourControl.asp

My declaration is as follows:
=================
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.Design
Imports System.Drawing

<ToolboxData("<{0}:EIB runat=server></{0}:EIB>")> <ToolboxBitmap("C:\EIB.bmp")> Public Class EIB
    Inherits System.Web.UI.WebControls.ImageButton
===================

EIB.bmp is a 16x16 by 16 color bitmap.  What am I doing wrong?  Can somebody advise me?

Regards,
A.Wooley
0
Comment
Question by:adwooley2
  • 3
  • 2
6 Comments
 

Author Comment

by:adwooley2
Comment Utility
Understood.

ADwooley
0
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
1) I don't use the ToolboxBitmap attribute, since it never has worked for me

2) What version of the .NET framework are you working with?  2.0 or 1.1?

3) I have done that embedded icon with the 1.1, but not 2.0.

4) Do you have a namespace for the control?

Bob
0
 

Author Comment

by:adwooley2
Comment Utility
Working with 2.0
I assume that the root namespace (as defined in project properties) is the namespace for the control... right?

I tried following declaration, but no magic still:

<ToolboxData("<{0}:EIB runat=server></{0}:EIB>")> <ToolboxBitmap(GetType(WCLibrary.EIB), "EIB.bmp")> Public Class EIB
    Inherits System.Web.UI.WebControls.ImageButton
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 225 total points
Comment Utility
You can download an example from here:

https://filedb.experts-exchange.com/incoming/ee-stuff/1319-WebControlLibrary1.zip

Resource:

How to find the elusive ToolboxBitmap icon
http://www.bobpowell.net/toolboxbitmap.htm

Bob
0
 

Author Comment

by:adwooley2
Comment Utility
Thanks. Will look into it.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now