I would like to create a base windows form with functionalities that all application forms needed and then inherits from it. This is available from VB or C# (in design mode) but I am not able to figure out how to do it in Visual Cobol so I can use the inherited form in design mode. Can someone help? Thanks!
I would like to create a base windows form with functionalities that all application forms needed and then inherits from it. This is available from VB or C# (in design mode) but I am not able to figure out how to do it in Visual Cobol so I can use the inherited form in design mode. Can someone help? Thanks!
Visual COBOL does not currently have a project template for Inherited Form like C# and VB do but you can inherit from an existing form by manually changing the Inherits clause on the class-id of both the form.cbl and the form.designer.cbl.
Example:
class-id testinherit.Form2 is partial
                 inherits type System.Windows.Forms.Form.
change to:
class-id testinherit.Form2 is partial
                 inherits type testinherit.Form1.
You can then use the designer to edit this form.
Visual COBOL does not currently have a project template for Inherited Form like C# and VB do but you can inherit from an existing form by manually changing the Inherits clause on the class-id of both the form.cbl and the form.designer.cbl.
Example:
class-id testinherit.Form2 is partial
                 inherits type System.Windows.Forms.Form.
change to:
class-id testinherit.Form2 is partial
                 inherits type testinherit.Form1.
You can then use the designer to edit this form.
That's what I am doing now. Thanks Chris!
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.