Autor Beitrag
Ryazor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Mi 19.02.03 14:48 
Hi Leute!
Ne Frage und zwar, wie kann ich es schaffen, dass ein bestimmtes Editfeld im "Vordergrund" steht, sodass man sofort aauf Tastendruck hineintippen kann? :D
Is vermutlich ne Noobfrage aber irgendwie krieg ichs nich so richtig hin mit rumprobiern...
Vielen Dank, Ryazor!
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mi 19.02.03 14:51 
Hallo

z.B. so
ausblenden Quelltext
1:
edit1.setfocus					


Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Ryazor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29



BeitragVerfasst: Mi 19.02.03 14:55 
Jo, genau das is das Problem! SetFocus klappt nicht!
Um mal präziser zu werden:
Mein Prog ist im Vordergrund, und jede Sekunde schiebt sichs erneut in den Vordergrund.
Allerdings, wenn man mit Alt+Tab ein anderes Programm aufruft, dann ist das Eingabefeld nicht mehr aktiv, das möchte ich ändern...
Naja, wie gesagt, setFocus klappt(e) bei mir nicht... Gibt's noch andere Wege?
Vielen Dank!
Trotzdem Danke für die schnelle Antwort, auch wenn se nix half *g*
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mi 19.02.03 15:07 
Zitat:

Mein Prog ist im Vordergrund, und jede Sekunde schiebt sichs erneut in den Vordergrund.

ja, so ein Programm würde mir auch gefallen :roll:
mal mit formstyle-stayontop probiert?

ansonsten schau dir Application.Onactivate (onactivate der Applicvation, nicht der Form!) an
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.proc_Appactivate;
  begin
    edit1.setfocus;
  end;
procedure Tform1.Formcreate
  begin
    Application.Onactivate := proc_Appactivate;
  end;

proc_activate in den private-abschnitt der Form aufnehmen

bzw. wenn du das Fenster aller sek in den vordergrund holst, dann schreib edit1.setfoucs in dein timer ereignis

Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)