Einzelnen Beitrag anzeigen

nahpets
(Gast)

n/a Beiträge
 
#12

Re: Problem beim Focus setzen nach erstellen eines forms

  Alt 12. Nov 2008, 10:59
Hallo,

Du hast in Deinem Quelltext zweimal Form9.Show, aber nur einmal Application.BringToFront.
Verlagere das Form9.Show und Application.BringToFront so, dass es in dem entsprechenden Else-Zweig immer durchlaufen wird. Damit sollte es dann funktionieren.
Delphi-Quellcode:
  if seh then begin
    application.Minimize;
    for I := 0 to screen.formcount - 1 do begin
      screen.forms[i].hide;
    end;
    seh := false;
  end else begin
    if sperr then begin
      if not s8 then begin
        s8 := true;
        Application.CreateForm(TForm9, Form9);
      end;
    end else begin
      for I := screen.formcount -1 downto 0 do begin
        screen.forms[i].show
      end;
      seh := true;
    end;
    form9.show;
    application.BringToFront;
  end;
  Mit Zitat antworten Zitat