Autor Beitrag
J.Borchert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 150

WIN10
XE2 Professional
BeitragVerfasst: So 28.11.04 17:56 
Ich zeichne ein Icon auf meine Form:

ausblenden Delphi-Quelltext
1:
2:
  Icon:=GetIconFromFile(Form1.Edit2.Text, 0);
  DrawIcon([/meta]Form1.Canvas.Handle, 90, 5, Icon);


Wie kann ich das Icon wieder Löschen ?

mfG Jürgen
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: So 28.11.04 18:15 
Mhh, warum zeichnest du das Icon nicht auf eine PaintBox und vesteckst sie dann?
Ansonsten übermal hal mit der Farbe btnFace, dann ist das Bild auch "gelöscht"!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
J.Borchert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 150

WIN10
XE2 Professional
BeitragVerfasst: Do 02.12.04 14:32 
Wie überschreibe ich denn das Icon ?
Alter Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
                  begin Form1.Edit2.Hint:=slp[0]; // Projekt mit Pfad
                        Form1.Caption:='Zeiterfassung für PC: '+slp[0];
                        rect.Left:=90;rect.Top:=5;
                        rect.Bottom:=30;rect.Right:=110;
                        Icon:=GetIconFromFile(Form1.Edit2.Hint, 0);
                        DrawIcon(Form1.Canvas.Handle, 90, 5, Icon);
                  end;


Habe hier die Lösung für die Nachwelt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
                  begin Form1.Edit2.Hint:=slp[0]; // Projekt mit Pfad
                        Form1.Caption:='Zeiterfassung für PC: '+slp[0];
                        rect.Left:=90;rect.Top:=5;
                        rect.Bottom:=40;rect.Right:=130;
                        Form1.Canvas.Brush.Color:= $00FF8080;
                        Form1.Canvas.FillRect(Rect);
                        Icon:=GetIconFromFile(Form1.Edit2.Hint, 0);
                        DrawIcon(Form1.Canvas.Handle, 90, 5, Icon);
                  end;


Danke für den Anschubser sagt Jürgen :P