Solved

ToolboxBitmap not working for me

Posted on 2006-10-30
6
749 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
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

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 …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 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