Fórum Funcao que retorno o formulario ativo, tem como fazer isto? #157297
02/05/2003
0
Pessoal vc´s como eu faco uma funcao que me retorne qual o formulario esta ativo no momento!
Rodrigo Ferreira
Curtir tópico
+ 0
Responder
Posts
02/05/2003
Rodrigo Ferreira
Olha ai galera o resultado da respota! ficou bom, obrigado amigos :wink:
function TLib01.CampoObrigatorio: Variant;
var
iInd: integer;
begin
Result := True;
with Screen.ActiveForm do
begin
for iInd := 1 to ComponentCount -1 do
begin
if Components[iInd].ClassType = TDBEdit then
begin
if ((Components[iInd] as TDBEdit).Tag = 10 ) and ((Components[iInd] as TDBEdit).Text = ´´ )then
begin
Confirmacao(´Favor preecher todos os campos obrigatórios marcos com [ * ]´, tInformacao, ´[*Ok]´, ´´);
Result := False;
Break;
end;
end;
end;
end;
end;
end.
function TLib01.CampoObrigatorio: Variant;
var
iInd: integer;
begin
Result := True;
with Screen.ActiveForm do
begin
for iInd := 1 to ComponentCount -1 do
begin
if Components[iInd].ClassType = TDBEdit then
begin
if ((Components[iInd] as TDBEdit).Tag = 10 ) and ((Components[iInd] as TDBEdit).Text = ´´ )then
begin
Confirmacao(´Favor preecher todos os campos obrigatórios marcos com [ * ]´, tInformacao, ´[*Ok]´, ´´);
Result := False;
Break;
end;
end;
end;
end;
end;
end.
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)