I know I'm missing something sooooo simple at this point... I tried what you suggested and I started a whole new Windows Form Project to test the .dll in and I'm still getting the same results (Only the button showing in the toolbox and it not having the correct icon file.)
Here's what I have right now:
Solution
---> Project
------> Button_Custom.bmp
------> Button_Custom.vb <-Class, not custom control
------>Label_Custom.bmp
------> Label_Custom.vb <- Class, not custom control
The code for Button_Custom.vb is:
Code:
<System.ComponentModel.Description("Custom Button"), ToolboxBitmap(GetType(Button_Custom), "Button_Custom.bmp")> _
Public Class Button_Custom
Inherits System.Windows.Forms.Button
Public Sub New()
InitializeComponent()
Me.BackColor = System.Drawing.Color.Transparent
Me.BackgroundImage = System.Drawing.Image.FromFile("\\Ast-fs01\homedirs\EngineeringPrograms\StandardFormDesign\FormHeaderBackground.jpg")
Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.MaximumSize = New System.Drawing.Size(104, 30)
Me.MinimumSize = New System.Drawing.Size(104, 30)
Me.Name = "Button_Custom"
Me.Size = New System.Drawing.Size(104, 30)
Me.TabIndex = 0
Me.Text = "Button_Custom"
Me.UseVisualStyleBackColor = False
End Sub
End Class
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Button_Custom
Inherits System.Windows.Forms.Button
'Control overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Control Designer
Private components As System.ComponentModel.IContainer
' NOTE: The following procedure is required by the Component Designer
' It can be modified using the Component Designer. Do not modify it
' using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
End Class The code for Label_Custom.vb is:
Code:
<System.ComponentModel.Description("Custom Label"), ToolboxBitmap(GetType(Label_Custom), "Label_Custom.bmp")> _
Public Class Label_Custom
Inherits System.Windows.Forms.Label
Private Sub New()
InitializeComponent()
Me.BackColor = Color.Aqua
End Sub
End Class
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Label_Custom
Inherits System.Windows.Forms.Label
'Control overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Control Designer
Private components As System.ComponentModel.IContainer
' NOTE: The following procedure is required by the Component Designer
' It can be modified using the Component Designer. Do not modify it
' using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
End Class Thank-you again for your help with this. I'm still "Googling" it too... but not having much luck on this so far...
Bookmarks