Archie showed me the basics, then I filled in the blanks. For example, the basicbutton... I took Archie's button control and copied and modified to fit my needs. I named it BasicButtonV2. I then created this control:
'****************************************************************
'* A Custom Control with a custom designer specified for use
'* in design mode in VS
'****************************************************************
Imports System.ComponentModel
<System.ComponentModel.Designer(GetType(BasicButtonDesigner))>
<ToolboxItem(True)>
Public Class BasicButton
Inherits BasicButtonV2
End Class
which works with this code...
Public Class BasicButtonDesigner
Inherits System.Windows.Forms.Design.ControlDesigner
Public Overrides ReadOnly Property Verbs As System.ComponentModel.Design.DesignerVerbCollection
Get
Dim verbs_ As New System.ComponentModel.Design.DesignerVerbCollection()
'* "Editor" will be added to the Smart Tags popup menu
Dim dv1 As New System.ComponentModel.Design.DesignerVerb("Editor", New EventHandler(AddressOf Me.ShowDesignerWindow))
verbs_.Add(dv1)
Return verbs_
End Get
End Property
Private Sub ShowDesignerWindow(ByVal sender As Object, ByVal e As EventArgs)
If (Me.Component IsNot Nothing) Then
Dim mcdf As New BasicButtonDesignerForm
mcdf.ControlToEdit = Component
mcdf.ShowDialog()
End If
End Sub
Public Overrides Sub DoDefaultAction() 'Implements IDesigner.DoDefaultAction
'Throw New NotImplementedException()
If (Me.Component IsNot Nothing) Then
Dim mcdf As New BasicButtonDesignerForm
mcdf.ControlToEdit = Component
mcdf.ShowDialog()
End If
End Sub
End Class
all of which uses the form (BasicButtonDesignerForm) for editing. One thing different that I do is all of my controls are in the AHMI solution, not the controls solution. That's easier for me. So, you should be able to see all of this under the AHMI solution, then in the folder MyHMI, then look in the Designers folder. I really only have two somewhat complete, the basicbutton and numeric, which is basically the analogvaluedisplay.