Property inheritance UserControl For Form VB.NET

0

How do I make a form inherit the same properties from a user control by dragging from the controlbox to the form?

Example: I created a UserControl with FormBorderStyle = none , compiled and generated the DLL inside visual studio, added this new control in my toolbox, and added it to Form. When dragging from the toolbox I wanted to already define that this Form will have FormBorderStyle = none .

    
asked by anonymous 12.04.2016 / 18:25

1 answer

0

Resolved

 public partial class UserControl1 : UserControl
    {
    public UserControl1()
    {
        InitializeComponent();            
    }

    protected override void OnLoad(EventArgs e)
    {
        this.ParentForm.FormBorderStyle = FormBorderStyle.None;
        base.OnLoad(e);
    }
}
    
12.04.2016 / 19:17