S
S
Stardust2019-03-25 22:21:43
Delphi
Stardust, 2019-03-25 22:21:43

Developing an authorization window in Delphi, how to make a form with a combobox?

Good evening everyone! Kind people, tell me please, how to create just such an authorization form? The user is selected from the Combobox, and the login button should go to the form that is intended, for example, for a doctor, if we select a manager, then the login button will go to the form for the manager, and so on. There are 4 users: Registrar, Manager, Doctor and Accountant, please help with the code!5c992a1834bf5978714935.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-03-25
@Stardust

procedure TMainForm.EnterButtonOnClick(Sender: TObject);
var
  Forms: array of TForm;
begin
  Forms := [RegistrarForm, ManagerForm, DoctorForm, AccountantForm]; // ваши формы
  Forms[Combobox.ItemIndex].ShowModal();
end;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question