Autor Beitrag
matzehl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Mi 16.02.05 09:43 
Moin! :D

Mein Programm besteht aus 2 Forms. Form1 ist mein eigentliches Programm. Form2 ist nur eine Infobox die die Programmversion,Firmenname + Kontakt + Webadresse und so enthält. Alles in allem besteht sie aus einem Button, 5 Labels einem Panel und einem Image, das ein 45 kb großes JPEG darstellt. Ziehe ich mein Hauptprogramm über den Bildschirm, funktioniert das tadellos, rufe ich aber meine Programminfos auf gibt's Probleme. Befindet sich die Infobox (also meine Form2) über meinem Hauptprogramm (Form1), was sie zwangsläufig tut, dann ruckelt die Infobox enorm, wenn ich sie verschiebe. Befindet sich die Infobox nicht über Form1 funzt das Verschieben tadellos. Woran kann das liegen und wie kann ich das lösen???

MfG

Matze
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 16.02.05 10:17 
Hast du mal Form2.doublebuffered:=True; ausprobiert?

_________________
We are, we were and will not be.
matzehl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Mi 16.02.05 11:06 
Hab es in das onCreate Ereignis von Form2 eingebunden. Geht immernoch nicht.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 16.02.05 11:19 
Hmmm.

Liegt das Image denn direkt auf der Form? Oder auf dem Panel? Dann könnte nämlich Panel1.doublebuffered:=True; helfen. Ansonsten weiß ich auch nicht weiter.

_________________
We are, we were and will not be.
matzehl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Mi 16.02.05 11:51 
Liegt direkt auf der Form. Kann ich verhindern, dass eine Form verschoben werden kann ohne die BorderStyle Eigenschaft auf None zu setzen? Muss ich halt unterbinden, dass die Infobox verschoben werden kann. :(
SchelmVomElm
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 154

W2K Pro
D5 Pro
BeitragVerfasst: Mi 16.02.05 13:17 
Hm, da ja offensichtlich das Neuzeichnen des Form1 das Flackern verursacht (schließlich läuft es ja ruckelfrei wenn Du außerhalb bist), würde ich viel eher Form1.Doublebuffered auf true setzen. Oder mach ich einen Denkfehler?

_________________
for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("|"+(*u/4)%2);
Wizard of OS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19

Win95, Win98, Win2000, WinNT, Win XP
D5
BeitragVerfasst: Mo 21.02.05 19:14 
Um zu verhindern, dass man ein Form verschieben kann, gaukel Windows
einfach vor, der Klick in die Titelzeile wäre nie erfolgt ...

Hierzu musst Du die Botschaft WMNCHitTest selbst behandeln ...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;

.
.
.

procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest);
begin
  
  inherited;

  with Message do
  begin
    //Wenn Klick in Titelzeile erfolgte
    if Result = HTCAPTION then
       //soll Windows der Meinung sein, Klick ging ins Leere
       Result := HTNOWHERE;
  end;
end;