Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Form sieht nach Programmstart anders aus (https://www.delphipraxis.net/81922-form-sieht-nach-programmstart-anders-aus.html)

-=cats=- 5. Dez 2006 12:43


Form sieht nach Programmstart anders aus
 
Hi :-)

Jetzt hab ich ein Problem gelöst und dadurch ein
neues bekommen :-D

Also, ich zeichne mir eine Form als Polygon.
Klappt alles wunderbar.
Das ganze mache ich im onCreate. Die Punkte
speichere ich in einem Array.

Jetzt habe ich der Form gesagt, sie soll schwarz
sein. Aber noch im Design-Modus (heißt das so ?).
Wenn ich das Programm jetzt starte, ist sie allerdings
nicht schwarz, sondern in der grauen Voreinstellung.
Meine Buttons werden auch nicht angezeigt.

Hat jemand eine Idee, woran das liegen könnte ?
Bin sehr ratlos ... :gruebel:

Gruß,
-=cats=-

:coder:

gmc616 5. Dez 2006 12:57

Re: Form sieht nach Programmstart anders aus
 
Nutzt du die XP-Styles (XPMan) ??
Wenn ja, dann könnte es was mit der Transparents zu tun haben.
Delphi-Quellcode:
ParentBackgroud := false;
Nur ne Vermutung.

SirThornberry 5. Dez 2006 13:11

Re: Form sieht nach Programmstart anders aus
 
Wie erzeugst du das Form? hättest du bischen Quelltext?

-=cats=- 5. Dez 2006 13:14

Re: Form sieht nach Programmstart anders aus
 
Hier ist mal mein gesamter Quellcode :-)

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var HR : HRgn;
 n : array [0..27] of TPoint;
begin
  n[0] := Point(Width div 2, Height -20); // P1
  n[1] := Point(Width div 2 + 40, Height - 24); // P2
  n[2] := Point(Width div 2 + 40, Height - 44); // P3
  n[3] := Point(Width div 2 + 80, Height - 48); // P4
  n[4] := Point(Width div 2 + 80, Height - 68); // P5
  n[5] := Point(Width div 2 + 40, Height - 72); // P6
  n[6] := Point(Width div 2 + 40, Height - 92); // P7
  n[7] := Point(Width div 2 + 80, Height - 96); // P8
  n[8] := Point(Width div 2 + 80, Height - 116); // P9
  n[9] := Point(Width div 2 + 40, Height - 120); // P10
  n[10] := Point(Width div 2 + 40, Height - 140); // P11
  n[11] := Point(Width div 2 + 80, Height - 144); // P12
  n[12] := Point(Width div 2 + 80, Height - 164); // P13
  n[13] := Point(Width div 2 + 40, Height - 168); // P14
  n[14] := Point(Width div 2, Height - 164); // P15
  n[15] := Point(Width div 2 - 40, Height - 168); // P16
  n[16] := Point(Width div 2 - 80, Height - 164); // P17
  n[17] := Point(Width div 2 - 80, Height - 144); // P18
  n[18] := Point(Width div 2 - 40, Height - 140); // P19
  n[19] := Point(Width div 2 - 40, Height - 120); // P20
  n[20] := Point(Width div 2 - 80, Height - 116); // P21
  n[21] := Point(Width div 2 - 80, Height - 96); // P22
  n[22] := Point(Width div 2 - 40, Height - 92); // P23
  n[23] := Point(Width div 2 - 40, Height - 72); // P24
  n[24] := Point(Width div 2 - 80, Height - 68); // P25
  n[25] := Point(Width div 2 - 80, Height - 48); // P26
  n[26] := Point(Width div 2 - 40, Height - 44); // P27
  n[27] := Point(Width div 2 - 40, Height - 24); // P28

  HR := CreatePolygonRgn(n, 28, ALTERNATE);
  SetWindowRgn(Handle, HR, true);
end;
XPStyles nehme ich soweit ich weiß nicht ...

gmc616 5. Dez 2006 13:21

Re: Form sieht nach Programmstart anders aus
 
Der Code funktioniert bei mir korrekt. Sogar mit XP-Styles. :-D

Das Problem muß wohl wo anders liegen.

-=cats=- 5. Dez 2006 13:29

Re: Form sieht nach Programmstart anders aus
 
Echt ?
Hmm ... so ein Mist :-(
Du hast nicht zufällig eine Idee, was das sein könnte ... ?

EDatabaseError 5. Dez 2006 13:29

Re: Form sieht nach Programmstart anders aus
 
Also bei mir funkts auch einwandfrei :? :gruebel:

-=cats=- 5. Dez 2006 13:35

Re: Form sieht nach Programmstart anders aus
 
Liste der Anhänge anzeigen (Anzahl: 1)
Spinne ich jetzt ... :gruebel:

Das kann ja nicht sein :-(

Hab mal nen Screenshot angehängt.
Eigentlich sollte die Form schwarz sein !!!

EDatabaseError 5. Dez 2006 13:37

Re: Form sieht nach Programmstart anders aus
 
lad bitte mal das form und die unit hoch...

mfg

-=cats=- 5. Dez 2006 13:41

Re: Form sieht nach Programmstart anders aus
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hier ist mal mein ganzer Ordner :-)
Habe nen LMDShapeButton auf der Form.
Nur falls Du kein LMD hast ...

Habe es jetzt nochmal mit einem anderen Formular
gemacht und dann ging es ... komisch ...


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:18 Uhr.
Seite 1 von 2  1 2      

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