using
System;
using
System.ComponentModel;
using
System.ComponentModel.Design;
using
System.Windows.Forms;
using
System.Windows.Forms.Design;
using
System.Drawing;
namespace
WellFormed
{
///
<summary>
/// Summary
description for AControl.
///
</summary>
[Designer(typeof(AControlDesigner))]
//associate the designer with the control
public class
AControl : Control
{
public
AControl()
{
//Because
the BackColor is always PowderBlue the BackColor property must be removed.
this.BackColor=Color.PowderBlue;
}
}
public class
AControlDesigner : ControlDesigner
{
public
AControlDesigner()
{
}
protected
override void
PreFilterProperties(System.Collections.IDictionary properties)
{
base.PreFilterProperties(properties);
//Remove
the BackColor property from the list of available properties.
properties.Remove("BackColor");
}
}
}
Imports
System
Imports
System.ComponentModel
Imports
System.ComponentModel.Design
Imports
System.Windows.Forms
Imports
System.Windows.Forms.Design
Imports
System.Drawing
Namespace
WellFormed
'/ <summary>
'/ Summary description for AControl.
'/ </summary>
<Designer(GetType(AControlDesigner))>
_
Public Class
AControl 'associate the designer with the control
Inherits
Control
Public
Sub New()
'Because
the BackColor is always PowderBlue the BackColor property must be removed.
Me.BackColor
= Color.PowderBlue
End
Sub 'New
End Class
'AControl
Public Class
AControlDesigner
Inherits
ControlDesigner
Public
Sub New()
End
Sub 'New
Protected
Overrides Sub
PreFilterProperties(properties As
System.Collections.IDictionary)
MyBase.PreFilterProperties(properties)
'Remove
the BackColor property from the list of available properties.
properties.Remove("BackColor")
End
Sub 'PreFilterProperties
End Class
'AControlDesigner
End
Namespace 'Boppowell.net