PDA

Ver la Versión Completa : Acceder a los forms abiertos de tu aplicacion


Neftali [Germán.Estévez]
07-06-2006, 09:55:15
Podemos saber cuantos formularios están abiertos en la aplicación y recorrerlos utilizando la variable Screen.
Vamos con el código:


var
i:Integer;
begin
i := Screen.FormCount;
MessageDlg(IntToStr(i) + ' formularios en pantalla/forms in screen', mtInformation, [mbOK], 0);
for i := 0 to (Screen.FormCount - 1) do begin
Screen.Forms[i].Caption := 'Form: ' + IntToStr(i);
end;