Setting the designer on a user control in VB.NET

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top