Topic: [SOLVED] it does not lose data while closing the form

var
  alterado: boolean = False;

procedure form4_Edit3_OnChange (Sender: string);
//*** flag que alteracao foi feita no campo
begin
    alterado := true;
end;


procedure Form4_OnShow (Sender: string; Action: string);
//**** desabilita todos os icones do sistema no formulario: fechar, minimizar e maximizar
begin
  Form4.BorderIcons:= 0;
end;


procedure form4_Button2_OnClick (Sender: string; var Cancel: boolean);
//*** evita sair sem gravar - botao de fechar tem que estar como "no action"
begin
    if alterado = false then Form4.Close;
    if alterado = true then
    if 6 = MessageDlg('Cancela alterações', mtConfirmation, mbYes + mbNo + mbCancel, 0) then
    Form4.Close;
end;

begn
end.

Roberto Alencar

2 (edited by jrga 2019-04-02 17:27:06)

Re: [SOLVED] it does not lose data while closing the form

Não sou programador e nem trabalho na área, mas me considero um auto-didata e consegui desenvolver o projeto abaixo, com tudo que aprendi neste fórum. Parabéns ao Dmitry por ter desenvolvido essa excelente ferramenta de programação, que é o MVD.

https://www.youtube.com/watch?v=BKr2gBA … e=youtu.be

Roberto Alencar

Re: [SOLVED] it does not lose data while closing the form

Thank you for the video!

Dmitry.

Re: [SOLVED] it does not lose data while closing the form

Mais um aplicativo concluído - ver no link abaixo - que desenvolvi com MVD 3.1.

https://youtu.be/gUu7wrpQZKY

Roberto Alencar

Re: [SOLVED] it does not lose data while closing the form

One more applications program developed with the MVD. It calculates profits in an application of fixed income. The calculator, besides financial calculations, to do taxes conversion.

https://youtu.be/Jq4cun0Tlcw

Roberto Alencar

Re: [SOLVED] it does not lose data while closing the form

Thank you!

Dmitry.