Solved

ToolboxBitmap doesn't work for me

Posted on 2006-10-30
3
446 Views
Last Modified: 2012-06-21
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
  • 2
3 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 225 total points
ID: 17839200
Create a .bmp file in the application that has the same name as the class--EIB.bmp.  Then change the 'Build Action' for the .bmp file to 'Embedded Resource'.

Bob
0
 

Author Comment

by:adwooley2
ID: 17839251
Bob,
Thanks, but it didn't work. Any other ideas? Do I have the declaration correct?

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

0
 

Author Comment

by:adwooley2
ID: 17839257
Sure am getting sick of this gear icon...
0

Featured Post

Independent Software Vendors: 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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

738 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