[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

ToolboxBitmap doesn't work for me

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
adwooley2
Asked:
adwooley2
  • 2
1 Solution
 
Bob LearnedCommented:
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
 
adwooley2Author Commented:
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
 
adwooley2Author Commented:
Sure am getting sick of this gear icon...
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now