Setting the designer on a user control in VB.NET

  • Thread starter Thread starter Robert C. Nell
  • Start date Start date
R

Robert C. Nell

I am unable to set the designer on a user control using the Designer
attribute on the UserControl class. I am able to get it to work in C# but
the same attribute is not recognized in VB. The code I'm using in C# is as
follows.

[Designer("System.Windows.Forms.Design.ParentControlDesigner,System.Design",
typeof(System.ComponentModel.Design.IDesigner))]
public class MyControl : System.Windows.Forms.UserControl

This allows the user control to act as a container in the IDE allowing other
controls to be nested within it. Using similar code in VB results in the
IDE reporting the designer attribute is not recognized. Am I missing a
reference or is this just not possible in VB?

Thanks!
 
Back
Top