M
MyndPhlyp
(Second posting attempt)
I have been through tons of old postings, several web sites, books, and even
tried consulting a psychic but nothing is yielding the majik answer. I'm
using VB '05 Express on a Win2K system.
The project has everything grouped under various directories. The Solution
Explorer looks like...
AProject
--My Project
--classes
----AClass.vb
--forms
----AForm.vb
--Resources
----AClass.bmp
If you haven't guessed it already I am trying to get the AClass.bmp to be
the Toolbox icon for the AClass class rather than the default gear. The
class's abbreviated version looks like...
Namespace AProject
<ToolboxBitmap(GetType(AProject.AClass), "AClass")> _
Public Class AClass
Inherits System.Windows.Forms.TextBox
' Properties, Methods, and Events snipped
End Class
End Namespace
The bitmap is 15x15 16-color. (Documentation says 16x16, expert sites say
16x15 or 15x16 but don't bother to mention if that is height-by-width or
width-by-height so I took the lowest common denominator.) The Build Action
is set to Embedded Resource.
The file is listed in the Project's Resources and the Persistence is set to
Linked at compile time.
I've tried several permutations on the string value at the second parameter
position including...
AProject.Resources.AClass (w/ and w/o ".bmp")
Resources.AClass (w/ and w/o ".bmp")
AProject.AClass (w/ and w/o ".bmp")
AClass (w/ and w/o ".bmp")
I've tried relocating the BMP to the root directory of the Project and/or
the classes directory.
I've tried a fully-qualified path and file name.
I've tried everything except electroshock therapy and I'm seriously
considering even that option today.
What the heck am I doing wrong (other than wasting time on this very trivial
matter)?
I have been through tons of old postings, several web sites, books, and even
tried consulting a psychic but nothing is yielding the majik answer. I'm
using VB '05 Express on a Win2K system.
The project has everything grouped under various directories. The Solution
Explorer looks like...
AProject
--My Project
--classes
----AClass.vb
--forms
----AForm.vb
--Resources
----AClass.bmp
If you haven't guessed it already I am trying to get the AClass.bmp to be
the Toolbox icon for the AClass class rather than the default gear. The
class's abbreviated version looks like...
Namespace AProject
<ToolboxBitmap(GetType(AProject.AClass), "AClass")> _
Public Class AClass
Inherits System.Windows.Forms.TextBox
' Properties, Methods, and Events snipped
End Class
End Namespace
The bitmap is 15x15 16-color. (Documentation says 16x16, expert sites say
16x15 or 15x16 but don't bother to mention if that is height-by-width or
width-by-height so I took the lowest common denominator.) The Build Action
is set to Embedded Resource.
The file is listed in the Project's Resources and the Persistence is set to
Linked at compile time.
I've tried several permutations on the string value at the second parameter
position including...
AProject.Resources.AClass (w/ and w/o ".bmp")
Resources.AClass (w/ and w/o ".bmp")
AProject.AClass (w/ and w/o ".bmp")
AClass (w/ and w/o ".bmp")
I've tried relocating the BMP to the root directory of the Project and/or
the classes directory.
I've tried a fully-qualified path and file name.
I've tried everything except electroshock therapy and I'm seriously
considering even that option today.
What the heck am I doing wrong (other than wasting time on this very trivial
matter)?