Visual Heritage of Windows Form

Asked

Viewed 356 times

0

I am making a base form with all the components I need to perform a CRUD, and for example, when I create the customer registration form, I will inherit the base class and so show up all the basic components I need to use, so far so good, when I realize this heritage the components appear as I really wanted, only that they are as blocked, I can not put any more component on top of this inherited form, there is this possibility to take the inheritance of the base class and then continue putting extra components ?

  • Good question , I am not an expert in setting up guis in c# but in this situation in java I would create a panel as a container in the main window , I would inherit this panel in the other window and add other guis in this new window (in the space left ), I believe you can apply this inheritance in a container and not in the whole form in c#.

1 answer

1


Yes, to edit the added controls in the parent form, change the properties MODIFIERS of these controls to PUBLIC.

  • Good morning Rovann, forgive my ignorance, but where do I find this modifiers to change to public ? No Initializecomponentes ?

  • I got it buddy, I changed the modified ones in Initializecomponent and it worked, thank you so much for the help.

  • 1

    is a property of Form, you can change them in the visual part too, in the Properties window of Visual Studio

Browser other questions tagged

You are not signed in. Login or sign up in order to post.