ToolboxBitmapAttribute(Type, String)[
^]
With this overload of the constructor, you will be able to specify the icon as an embedded resource in the assembly.
First, in the
Solution Explorer, select the
icon.ico file, and in the
Properties window, set the build action for the icon to
EmbeddedResource
.
Then, declare the attribute this way:
<System.Drawing.ToolboxBitmap(GetType(ControlIcon), "icon.ico")> _
Partial Public Class ControlIcon
Inherits Windows.Forms.TextBox