Ver Mensaje Individual
  #2  
Antiguo 11-07-2008
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.293
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Se trata de buscar el formulario a partir de su nombre, y si lo encuentras visualizarlo.

Se me ocurre que se puede hacer a partir de TApplication:

Código Delphi [-]
var
  f:TForm;
  c:TComponent;
  sName:string;
begin
  sName := 'Fm' + LbLetrero.Caption;
  c := Application.FindComponent(sName);

  // encontrado?
  if Assigned(c) then begin
    TForm(c).Show;
  end;

O a partir de la clase TScreen:
Código Delphi [-]
var
  sName:string;
begin
  sName := 'Fm' + LbLetrero.Caption;

  // recorrer los forms
  for i := 0 to (Screen.FormCount - 1) do begin
    if (AnsiCompareText(Screen.Forms[i].Name, sName) = 0) then begin
      Screen.Forms[i].Show;
      Break;
    end;
  end

Es eso?
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita