Autor Beitrag
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Di 13.02.07 16:22 
Hallo Leute
Wo liegt mein Fehler
Ich hab drei Images, 1 und 2 liegen auf Image3 nun möchte Ich das um alle drei Images
ein Rahmen gezeichnet wird und in jedes Image ein weißes Bild geladen wird, das klappt auch
so

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure TForm1.FormPaint(Sender: TObject);
begin
  {ImageList1.GetBitmap(0, Image3.Picture.Bitmap); Hier klappts dann nicht mehr }
  ImageList1.GetBitmap(0, Image2.Picture.Bitmap);
  ImageList1.GetBitmap(0, Image1.Picture.Bitmap);

  Canvas.Pen.Width:=1;
  Canvas.Pen.Color:=clBlack;

  Canvas.Rectangle(Image3.Left-1,Image3.Top-1,
  Image3.Left+Image3.Width+1,Image3.Top+Image3.Height+1);

  Canvas.Rectangle(Image1.Left-1,Image1.Top-1,
  Image1.Left+Image1.Width+1,Image1.Top+Image1.Height+1);

  Canvas.Rectangle(Image2.Left-1,Image2.Top-1,
  Image2.Left+Image2.Width+1,Image2.Top+Image2.Height+1);
end;

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Di 13.02.07 16:40 
Ich glaub du hast irgendwie vergessen die frage zu stellen :P

_________________
Aya
I aim for my endless dreams and I know they will come true!
Blackheart666 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Di 13.02.07 16:44 
ausblenden Delphi-Quelltext
1:
{ImageList1.GetBitmap(0, Image3.Picture.Bitmap); Hier klappts dann nicht mehr }					


Wenn Ich in Image3 das Bild einfüge klappts nicht mehr, Ich schätze mal er erstellt schon den Rahmen aber er wird wieder übermalt von Image3.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Di 13.02.07 19:12 
Hi,

ich versteh dein Problem leider immernochnicht so richtig...
Was genau soll bei rauskommen, und was genau macht er im moment falsch?

Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
Blackheart666 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Di 13.02.07 20:58 
Ich probiers nochmal Ich hab drei Images wovon zwei im Image3 liegen.
Jetzt möchte Ich einen rahmen um jedes einzelne Image zeichnen, was auch klappt.
Wenn Ich ein Bild in Image3 lade klappt es nicht.
Hoffe das war verständlicher.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mi 14.02.07 11:21 
Hi,

bin mir nich sicher ob ich dich jetzt richtigverstanden habe, aber... es kann doch dann auch nichtmehr klappen (wenn nicht klappen meint, das kein rahmen zu sehen ist), wenn du in Image3 ein Bild lädst, sofern dieses hinter den anderen beiden ist.

Denn deinen rahmen zeichnest du im OnPaint des Forms auf den Canvas des Forms, und dieser wird halt durch Image3 verdeckt.
Du solltest deinen rahmen direkt auf die Images zeichnen, oder alternativ auf Image3 statt auf den Form-Canvas.

Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
Blackheart666 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 14.02.07 12:16 
Das hast Du schon richtig verstanden der Rahmen um Image3 bleibt erhalten weil Ich ihn ja drumrum Zeichne.
Nur die Rahmen um die zwei Images die auf Image3 liegen
werden dann nicht mehr angezeigt.
Ich habs auch probiert das Canvas auf Image3 zu beziehen
dann kommt es zu andauernden flackern als ob ein timer an ist.
Wenn Ich das rahmenzeichnen von Image 1 und 2 in einen Button packe dann funzt es.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mi 14.02.07 12:23 
Dann mach mal DoubleBuffered:=true, das sollte gegen das Flackern helfen.

Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
Blackheart666 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 14.02.07 12:37 
Das hilft auch nicht.
Hänge mal das Prog an damit man mal eine Vorstellung kriegt.
Mit dem Erklären ist immer so eine Sache. :wink:

Edit:
Das Image3 Brauch auch nicht Unbedingt ein Image sein, habs auch schon mit Label und Shape(da hätt Ich mir den Rahmen gespart) probiert klappt aber auch nicht.

Edit:
Habs hinbekommen, hab alles in eine procedure gepackt.
Danke :wink:
Einloggen, um Attachments anzusehen!