Autor Beitrag
ub60
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 764
Erhaltene Danke: 127



BeitragVerfasst: Di 16.09.08 16:19 
Hallo Leute,

ich habe für mehrere Kollegen ein Programm geschrieben, in dem ein SpeedButton (und weitere Komponenten) dynamisch erzeugt werden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  SpeedBtn:=TSpeedButton.Create(Self);
  with SpeedBtn do
    begin
      Left:=200;
      Top:=50;
      Width:=100;
      Height:=24;
      Parent:=Self;
      Caption:='Text';
      OnClick:=SpeedButtonClick;
    end;

Bei etwa 50 Computern klappt auch alles, wie es soll, aber bei zwei Kollegen werden die Komponenten an der falschen Stelle erzeugt, nämlich nicht 200 Pixel vom linken Formularrand, sondern 200 Pixel vom Bildschirmrand (gleiches für oben).

Ist Euch so ein Fehler bekannt und hat jemand eine Idee, was ich probieren oder ändern könnte?

ub60
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: Di 16.09.08 17:54 
Immer zuerst den Parent setzen, dann die Position des Controls ändern.

_________________
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.
ub60 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 764
Erhaltene Danke: 127



BeitragVerfasst: Di 16.09.08 18:48 
Danke für den Hinweis, werd es mal probieren.

Stellt sich mir immer noch die Frage, warum es bei 50 Rechnern funktioniert und bei zwei Rechnern nicht.

ub60
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Mi 17.09.08 18:14 
______________________________


Wikipedia Mandelbug



______________________________
ub60 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 764
Erhaltene Danke: 127



BeitragVerfasst: Mi 17.09.08 19:20 
Danke, das hilft mir wirklich weiter :evil:

Der Fehler ist übrigens reproduzierbar. Die Kollegen können allerdings heute oder morgen erst testen. Sollte der Tipp geholfen haben, melde ich mich noch einmal.

ub60
ub60 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 764
Erhaltene Danke: 127



BeitragVerfasst: Do 18.09.08 22:23 
Wie versprochen die Rückmeldung:

Leider hat die Änderung nach dem Hinweis von BenBe nicht geholfen.
Die dynamisch erzeugten Komponenten werden auf den genannten Rechnern immer noch falsch dargestellt.

Hat noch jemand eine Idee, woran das liegen könnte?

ub60
Tilman
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1405
Erhaltene Danke: 51

Win 7, Android
Turbo Delphi, Eclipse
BeitragVerfasst: Do 18.09.08 22:35 
ich hatte mal merkwürdige ergebnisse auf einem seeehr langsamen windows 98-rechner. Also wenn die Kollegen von dir sehr lahme kisten verwenden bzw. win 98 dann könnte das ein Hinweis sein. (Der programmaufbau hat sehr lange gebraucht und einige Komponenten waren dann an der falschen Stelle).

_________________
Bringe einen Menschen zum grübeln, dann kannst du heimlich seinen Reis essen.
(Koreanisches Sprichwort)
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Fr 19.09.08 13:11 
Ich hatte mal ein solches Problem. Dort waren die Verwendung von "Großen Schriftarten" in den Desktop-Einstellungen Schuld. Auf normale Größe geändert, dann gings. (Eigenschaften von Anzeige/Dartstellung/Schriftgrad)
Vielleicht hilfts Dir weiter.

Gruß jjturbo

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...