AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Focus on Form

Ein Thema von sk.Silvia · begonnen am 23. Aug 2006 · letzter Beitrag vom 23. Aug 2006
Antwort Antwort
Benutzerbild von sk.Silvia
sk.Silvia

Registriert seit: 8. Feb 2006
Ort: Slovenia
90 Beiträge
 
Delphi 7 Personal
 
#1

Focus on Form

  Alt 23. Aug 2006, 20:11
hi there, i have 2 forms, which are both visible, but when the program starts, i want to have the 2 form which is smaller and hidden behind the 1 form, to have it infront of form 1

the Form2.SetFocus didnt worked out... how can i do this?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: Focus on Form

  Alt 23. Aug 2006, 20:19
.BringToFront or open it via .ShowModal.
Markus Kinzler
  Mit Zitat antworten Zitat
Balu der Bär
(Gast)

n/a Beiträge
 
#3

Re: Focus on Form

  Alt 23. Aug 2006, 20:19
Have you already tried a simple Form2.BringToFront?
  Mit Zitat antworten Zitat
Benutzerbild von sk.Silvia
sk.Silvia

Registriert seit: 8. Feb 2006
Ort: Slovenia
90 Beiträge
 
Delphi 7 Personal
 
#4

Re: Focus on Form

  Alt 23. Aug 2006, 20:44
jup! but it isnt working, it is working when i give an onpress procedure and there Form2.BringToFront
but
when i give it to the OnCreate (or to Form1 or Form2), it dont works, i need to that it brings itself without a users action (press button etc)
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#5

Re: Focus on Form

  Alt 23. Aug 2006, 20:45
Also tried in the Main-Loop (dpr)?
Markus Kinzler
  Mit Zitat antworten Zitat
Benutzerbild von sk.Silvia
sk.Silvia

Registriert seit: 8. Feb 2006
Ort: Slovenia
90 Beiträge
 
Delphi 7 Personal
 
#6

Re: Focus on Form

  Alt 23. Aug 2006, 21:01
whats main loop? google didnt help:/
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#7

Re: Focus on Form

  Alt 23. Aug 2006, 21:12
The main-loop can be found in the Project-Source:

Delphi-Quellcode:
program Test;

uses
  Forms,
  Unit1 in 'Unit1.pas{Form1},
  Unit2 in 'Unit2.pas{Form2};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Form2.Show;
  Form2.BringToFront;
  Application.Run;
end.
Markus Kinzler
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:57 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz