Designing a base form and inheriting it

Posted by joelwins on 15-Feb-2013 05:10

I am working on OE10.2B and .Net using OE Architect.

Could someone please let me know how and where to design a .Net base form  (is this a super class?)  and inherit that form for all my subsequent form creations?

Thanks and best regards,

Joel W Winston

All Replies

Posted by Admin on 15-Feb-2013 05:42

Just create a class inheriting from Progress.Windows.Form.

Then, when creating a Form use the New ABL Form Wizzard specify that base class under "Inherits".

Posted by joelwins on 15-Feb-2013 06:07

Thanks much Mike. That helped.

Best regards,

Joel

Posted by joelwins on 15-Feb-2013 08:22

Hello Mike,

One question related to the previous thread. In the base form I have written a AutoFitForm method (called during the "Load" event) to fit the form to the available screen resolution. But that fires even during the design time - that is when I inherit the base form. Is there a way to suppress this at design time. Please let me know.

Thanks & best regards,

Joel

Posted by Admin on 15-Feb-2013 08:41

The LicenseManager approach described here works for us:

http://dotnetfacts.blogspot.be/2009/01/identifying-run-time-and-design-mode.html

Posted by mopfer on 15-Feb-2013 08:51

If your application has session-level properties defined that get set at runtime but would still have the default value in development mode, you can add a check one of those variables before executing code you want to skip in development mode too.

Posted by joelwins on 16-Feb-2013 00:37

Thanks Mike that helped.

Posted by joelwins on 16-Feb-2013 00:38

Thanks much Mark.

This thread is closed