Autor Beitrag
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 30.03.05 22:05 
Habe in einer Funktion auf das TForm.Canvas eine BitMap gekachelt -> das funktioniert mal. Weiters wird dann ein Text am unteren rechten Rand des Forms auf das Canvas ausgegeben -> passt auch. Nur wenn das Form in der Größe verändert wird bleibt der Text an der vorher erstellten Position stehen; da dies im OnPaint Ereignis aufgerufen wird kommt der Text auch auf die neue Position nur bleibt wie gesagt der Text an der alten Position stehen zumindest bis ich ein Fenster oder so darüber ziehe repaint geht nicht da ja im OnPaint Ereignis aufgerufen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TMainForm.FormPaint(Sender: TObject);
begin
KachleBitmap(bgimage.Picture.Bitmap,MainForm.Canvas,true);

MainForm.Canvas.Font.Color:=clWhite;
MainForm.Canvas.Font.Size:=10;
MainForm.Canvas.Font.Style:=[fsbold];
MainForm.Canvas.TextOut(MainForm.Width-200,MainForm.Height-50,'direction');
end;


Hoffe jemand einen Vorschlag

Moderiert von user profile iconGausi: Code- durch Delphi-Tags ersetzt.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 30.03.05 22:12 
falls ich dich richtig verstanden habe sollte ein einfaches application.processmessages reichen.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 30.03.05 22:18 
Schau dir mal Suche in: Delphi-Forum, Delphi-Library INVALIDATERECT an.

@retnyg: Ist dir schonmal aufgefallen das dein Namen rückwärts gelesen Günther ergibt? :) Btw. funktioniert das mit application.processmessages glaub ich nicht. Das muss ja schließlich neu gezeichnet werden.
direction4delphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 30.03.05 22:54 
Leider keinerlei Besserung habe auch ein TForm.Canvas.FillRect versucht nix.

user profile iconKarlson hat folgendes geschrieben:
Schau dir mal Suche in: Delphi-Forum, Delphi-Library INVALIDATERECT an.

@retnyg: Ist dir schonmal aufgefallen das dein Namen rückwärts gelesen Günther ergibt? :) Btw. funktioniert das mit application.processmessages glaub ich nicht. Das muss ja schließlich neu gezeichnet werden.
direction4delphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 30.03.05 22:57 
Funktioniert leider auch nicht. Auf das Canvas wird im OnPaint die Bitmap neu gekachelt und auch der Text ausgegeben. Nur der vorherige Text bleibt hängen. Bräuchte sowas wie einen refresh aber über canvas oder Tfrom hilfts nicht

user profile iconretnyg hat folgendes geschrieben:
falls ich dich richtig verstanden habe sollte ein einfaches application.processmessages reichen.
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: Mi 30.03.05 23:19 
Bist du dir sicher das du die alte Stelle auch "übermalst"? Wenn nicht, dann musst du das tuen, sonst bleibt es da "ewig" stehen.
Am besten das ganze in einem Bitmap zwischenspeichern, damit es auch nicht flackert!

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
direction4delphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Do 31.03.05 01:09 
Genau so habe ich es gemacht (Bitmap) TForm.Canvas.Fillrect(Rect(0,0,Mainform.width,MainForm.Height));
Denke da kann ich keine Stelle auslassen.


user profile iconwulfskin hat folgendes geschrieben:
Bist du dir sicher das du die alte Stelle auch "übermalst"? Wenn nicht, dann musst du das tuen, sonst bleibt es da "ewig" stehen.
Am besten das ganze in einem Bitmap zwischenspeichern, damit es auch nicht flackert!
direction4delphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Fr 01.04.05 09:38 
Hat sich soweit erledigt habe das schreiben des Textes auf das canvas aufgegeben und durch eine label komp ersetzt -> da funktioniert das aktualisieren obwohl ich nach wie vor das hintergrundbild auf das canvas kachle