Imports System.Windows.Forms Imports System.Drawing <ToolboxBitmap(GetType(Label))> _ Public Class LXLabel Inherits System.Windows.Forms.Label Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(LinkLabel))> _ Public Class LXLinkLabel Inherits System.Windows.Forms.LinkLabel Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(Button))> _ Public Class LXButton Inherits System.Windows.Forms.Button Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(TextBox))> _ Public Class LXTextBox Inherits System.Windows.Forms.TextBox Public Sub New() End Sub End Class <ToolboxBitmap(GetType(CheckBox))> _ Public Class LXCheckbox Inherits System.Windows.Forms.CheckBox Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(RadioButton))> _ Public Class LXRadioButton Inherits System.Windows.Forms.RadioButton Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(GroupBox))> _ Public Class LXGroupBox Inherits System.Windows.Forms.GroupBox Public Sub New() FlatStyle = Windows.Forms.FlatStyle.System End Sub End Class <ToolboxBitmap(GetType(PictureBox))> _ Public Class LXPictureBox Inherits System.Windows.Forms.PictureBox Public Sub New() End Sub End Class <ToolboxBitmap(GetType(ListBox))> _ Public Class LXListBox Inherits System.Windows.Forms.ListBox Public Sub New() End Sub End Class <ToolboxBitmap(GetType(CheckedListBox))> _ Public Class LXCheckedListBox Inherits System.Windows.Forms.CheckedListBox Public Sub New() End Sub End Class <ToolboxBitmap(GetType(ComboBox))> _ Public Class LXComboBox Inherits System.Windows.Forms.ComboBox Public Sub New() End Sub End Class <ToolboxBitmap(GetType(TabControl))> _ Public Class LXTabControl Inherits System.Windows.Forms.TabControl Public Sub New() End Sub End Class <ToolboxBitmap(GetType(NumericUpDown))> _ Public Class LXNumericUpDown Inherits System.Windows.Forms.NumericUpDown Public Sub New() End Sub End Class Public Class LXTabPage Inherits System.Windows.Forms.TabPage Public Sub New() End Sub End ClassThen, in a Robot form, in the framework, I have 10 controls. They are all bound on those controls. I have done numerous compilations since then and never had any problem. However, as soon as I went today in the Robot form and adjusted a property of a control, I started to get a bunch of errors which corresponds to the number of controls I have. The reason is before I moved the Robot form at the framework level, all controls were referenced as Framework.LXTabControl, Framework.LXButton and so on. Now, as they are at the framework level, this Framework reference has to be dropped from the control reference. Because, as soon as I change something, the design detects that and complains. So, I can go in the code and change the control instantiation lines to remove the "Framework." reference to this:
Me.TabControl1 = New LXTabControl Me.TabPage1 = New LXTabPage Me.GroupBox2 = New LXGroupBox Me.Status = New LXTextBox Me.LxPictureBox1 = New LXPictureBox Me.Button3 = New LXButton Me.Button2 = New LXButton Me.PictureBox2 = New LXPictureBoxThis allows me to compile. But, as soon as I go back at the form and change another property, the "Framework." gets added in front of all those controls.