>In vfp, w can make visual classes in vfp including form classes. Anybody knows how to do form classes in visual way with .NET?Hi Luis,
All you have to do is create a Form as you usually would. When you need to sub-class from that Form, the easiest thing to do is just create another form, and change the class in code.
So when you add a new Form, the class gets generated like this:
public partial class TestForm : Form
{
public TestForm()
{
InitializeComponent();
}
}
Replace the System Form with yours:
public partial class TestForm : MyBaseForm
{
public TestForm()
{
InitializeComponent();
}
}
Also, take a look at my blog post for sub-classing other controls (such as TextBox, ComboBox, etc.):
http://geek-goddess-bonnie.blogspot.com/2009/10/why-and-how-to-sub-class-base-classes.html~~Bonnie