Solved

ToolboxBitmap not working for me

Posted on 2006-10-30
6
761 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:adwooley2
ID: 17846638
Understood.

ADwooley
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17848852
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
ID: 17854579
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
ID: 17897411
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
ID: 17903066
Thanks. Will look into it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

691 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