Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ToolboxBitmap doesn't work for me

Posted on 2006-10-30
3
Medium Priority
?
472 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 675 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 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