How to inherit a form in C #?

0

I have an application with the FormFuncionario form. I want to inherit all the characteristics of this form for a second class, called ControlFuncionario , where it will be responsible for performing several events, and even accessing the database. I was taught that I should not leave the logic and database part directly in the GUI layer, so I created another BLL call and tried to apply the following code: p>

namespace BLL.Pessoal // Camada/Pasta que está localizada a classe
{
    class ControlFuncionario : GUI.FormFuncionario //Aponta erro

    {
    }
}

The error is as follows:

  

CS0012 C # The type 'Form' is defined in an assembly that is not   referenced. You must add a reference to assembly.

My question is how do I inherit this Form for a "common" class ...

    
asked by anonymous 03.05.2018 / 21:08

1 answer

1

As the error says, binaries of type Form are not referenced in the project that contains the class ControlFuncionario .

Add to this project a reference to assembly System.Windows.Forms .

    
04.05.2018 / 00:54