Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ToolboxBitmap not working for me

Posted on 2006-10-30
6
Medium Priority
?
774 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
5 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 675 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month20 days, 20 hours left to enroll

810 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