You should build your application in the "Rule-Based" ( role-based) format.
For this, you can make your forms inherit some specific access control behaviors.
Here you will find a detailed tutorial on how to do this ( in English).
All in all, this tutorial does not reach the field level (forms only). This part you need to implement "on hand" through the Visible
property of the components.
Another way to implement is to do access control before opening the form itself.
Usually a menu based on data is used in the database and this data can be set whether or not the menu option is displayed.
But still, field-level permissions should be implemented manually.
Setar property Visibile
to false
can lead to layout problems if you are not using specific layout classes ( containers
) in your form.
If you do not already use it, I advise you to read FlowLayoutPanel and TableLayoutPanel