Autor Beitrag
cbs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: Fr 29.02.08 18:24 
Tag auch

Ich kann in meinem Programm bei Bedarf ein zweites Formular (nur mit show angezeigt) öffnen, welches Statusinformationen enthält. Dieses zweite Formular ist recht groß (fast doppelt so groß wie das Hauptformular) und verdeckt ständig einen großteil des Hauptformulars. Selbst wenn ich das Hauptformular direkt anklicke bekommt es zwar den Eingabefocus, wird aber immernoch durch das zweite Formular teilweise verdeckt. Da es so groß ist, wird auch beim verschieben des zweiten Formulars ständig ein Teil verdeckt was sehr störend ist.

Ich habe das unter Vista als auch XP ausprobiert. Bei beiden Systemen das selbe Verhalten.

Mit

ausblenden Delphi-Quelltext
1:
2:
3:
TForm.BringToFront
// oder
TForm.SetFocus


erziehle ich auch nicht das gewünschte Verhalten.

Erzeuge ich jedoch ein drittes Formular (auch nur mit show angezeigt) kann ich zwischen dem zweiten und dritten hin und herwechseln, wobei jeweils das andere Formular den Focus erhält, als auch korrekt in den Vordergrund geholt wird. Dieses Verhalten wünsche ich mir auch für das Hauptformular.

Wie kann ich das bewerkstelligen?

Danke schon mal für Antworten!

mfg

cbs
artelogic
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Fr 29.02.08 19:16 
Die Eigenschaft FormStyle des zweiten Forms steht aber nicht zufällig auf fsStayOnTop, oder?
cbs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: Fr 29.02.08 22:57 
Nein. Steht auf fsNormal
cbs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: Sa 01.03.08 23:44 
Ich würde wenigstens gern wissen ob das ein normales Verhalten der Forms ist.

Wird euer Hauptformular auch von anderen Formularen verdeckt, obwohl das Hauptformular den Focus hat?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 01.03.08 23:46 
Nope. Wird es nicht ...

Am Form-Style (also MDI, SDI, ... hast Du auch nicht dran rum gedreht? Irgendwelche Zusatz-Komponenten auf'm Form?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
cbs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: So 02.03.08 11:33 
Nein der Formstyle ist fsNormal.

Ich nutze nur die Standard Komponenten die in Delphi mitgeliefert sind. Ich habe nicht mal andere Komponenten installiert.

Ich habe im Anhang 3 Screenshots reingepackt die verdeutlichen was ich meine.

Ich habe einfach ein neues Projekt geöffnet, zwei neue Formulare erstellt und die Units in Form1 eingebunden. Dann 2 Buttons auf Form1 gepackt und jeweils Form2 und Form3 mit show; aufgerufen.

Ich habe darüberhinaus keinerlei Eigenschaften geändert.

Im Screenshot 1 hat Form1 (Hauptform) den Focus ist aber im Hintergrund und wird von den beiden anderen Formularen verdeckt.

Im Screenshot 2 hat Form2 den Focus und ist korrekt im Vordergrund. Form1 als auch Form3 sind korrekt im Hintergrund.

Im Screenshot 3 hat Form3 den Focus und ist im Vordergrund wobei Form2 (welches vorher im Vordergrund war) hinter Form3 gerückt wurde und auch Form1 korrekt im Hintergrund ist.

Ich würde nun gern dieses Verhalten von Form2 und Form3 auch in meinem Hauptformular haben. So das andere Formulare die ich in meiner Anwendung aufrufe (es sei den ich rufe sie mit showmodal; auf) in den Hintergrund gerückt werden.
Einloggen, um Attachments anzusehen!
artelogic
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Mo 03.03.08 08:58 
ist nicht normal...

poste doch mal die DFM-Dateien!
cbs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: Mo 03.03.08 09:32 
Es hat sich grade erledig.

Es lag an der Eigenschaft TApplication.MainFormOnTaskbar die standardmäßig auf true ist und meine Anwendung irgendwie Vista kompatibler machen soll. Wenn ich sie auf false setze oder auskommentiere verhalten sich meine Forms so wie es sein soll.

Danke für eure Antworten.


mfg

cbs