Personal the problem is as follows, I click on the button to create a new form, edit1 receives the focus, digital keyboard appears when I click on the letter a for example the app closes, why will it ?? Can anyone help ..?
procedure Tformadhor.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action := TCloseAction.caFree;
formadhor:=nil;
formrel.somarel(usua.Id);
formrel.Show;
end;
procedure Tformadhor.FormShow(Sender: TObject);
begin
edpub.SetFocus;
end;
procedure Tformadhor.Rectangle3Click(Sender: TObject);
begin
close;
end;
procedure Tformadhor.Rectangle5Click(Sender: TObject);
begin
salvareg;
MultiView1.HideMaster;
end;
procedure Tformadhor.salvareg;
var
reg:TRegrel;
db:TDM2;
begin
reg:=TRegrel.create('null',m,y,strtoint(edpub.Text),strtoint(editvid.Text),
edithora.Text,strtoint(editrev.Text),strtoint(editest.Text));
db:=TDM2.Create(nil);
if db.salvareg(usua,reg) then
Showmessage('Salvo com Sucesso!!');
db.DisposeOf;
end;
procedure Tformadhor.setusu(usu: TUsuario; nomemes: string; mes, ano: Integer);
begin
Labnome.Text:=usu.nomecomp;
labmes.Text:=nomemes;
usua:=TUsuario.create('clone','','','',0);
usua.clone(usu);
m:=mes;
y:=ano;
end;