Hallo,
das Zeichnen eines Icons z.B. auf ein Panel funktioniert über das Paint-Ereignis des Controls:
e.Graphics.DrawIcon(SystemIcons.Error,0,0);
Warum wird aber das <b>Icon nicht angezeigt,</b> wenn ich <u>direkt zeichne:</u>
System.Drawing.Graphics gr = panel1.CreateGraphics();
gr.DrawIcon(SystemIcons.Error,0,0);
gr.Dispose();
Kann mir das jemand kurz erklären? Fehlt noch eine Aktualisierung? (panel1.Refresh() bringt keine Änderung. Oder ist der Borland-Compiler schuld?)
Danke! Jürgen
das Zeichnen eines Icons z.B. auf ein Panel funktioniert über das Paint-Ereignis des Controls:
e.Graphics.DrawIcon(SystemIcons.Error,0,0);
Warum wird aber das <b>Icon nicht angezeigt,</b> wenn ich <u>direkt zeichne:</u>
System.Drawing.Graphics gr = panel1.CreateGraphics();
gr.DrawIcon(SystemIcons.Error,0,0);
gr.Dispose();
Kann mir das jemand kurz erklären? Fehlt noch eine Aktualisierung? (panel1.Refresh() bringt keine Änderung. Oder ist der Borland-Compiler schuld?)
Danke! Jürgen
Comment