Visual inheritance & DESIGNER constant: Where is it?

G

Guest

Hello all!

I have developed a class that inherits from System.Windows.Forms.Form which
enhances the base type's keyboard handling.

This new type (EnhancedForm) is to be inherited from all the forms in my
project.
I am aware that visual inheritance is not supported in the CF, so I tried to
fool the designer by declaring my subclasses like this:

#if DESIGN
public class ASubclassedForm: System.Windows.Forms.Form
#else
public class ASubclassedForm: MyCompany.Windows.Forms.EnhancedForm
#
{
...

Visual studio .NET 2003 is supposed to automatically define a constant named
"DESIGN" in design time. I've seen it used in OpenNetCF and read articles
about it, but in my case the code under the #if DESIGN block is allways
grayed out in the designer, unless I define the constant myself.

Any clues?

Thanks in advance.
 
G

Guest

Sorry, the site informed me that ther was a problem submitting my post
so I posted it again! Please see the latest post!
 

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