Autor Beitrag
Delphianer23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 156



BeitragVerfasst: Di 04.02.03 16:04 
Ich mach nen scrennshot, kurz davor wird aber noch eine komponete .visible:=false gesetzt, damit diese nicht auf dem Bild vorhanden ist.

Es ist allerdings zu kurz davor, dass der Bildschirm nicht mehr "geupdated wird" und eine komponente (ein großer Button) darauf zu sehen ist.

Wie aktualisiert man den Bildschirm?
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Di 04.02.03 16:21 
Hi,

bist du dir sicher das du den Button ERST ausblendest, und dann den Screenshot machst..??

Bei mir geht das nämlich problemlos...

Poste dochmal deinen Code :)

Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Di 04.02.03 16:25 
Hi,

hab grad rausgefunden das wenn man DoubleBuffered=true gemacht hat, das der Button dann noch dableibt beim Screenshot.. :)

Abhilfe bringt da:
ausblenden Quelltext
1:
2:
3:
Button1.Visible:=False;
Form1.Refresh;
MakeScreenshot(Image1.Picture.Bitmap);


Au'revoir,
Aya~

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



BeitragVerfasst: Di 04.02.03 16:29 
ja, bin mir ganz sicher

etwa so siehts aus
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
groupbox1.visible:=false

Bitmap1:=TBitmap.create
...
c.handle:=GetDC(HWND_DESKTPOP);
...
Bitmap1.saveto file ...
Release()
Bitmap1.free;

groupbox1.visible:=true;

auf jeden Fall werden die Sachen vorher auf visible false gesetzt, Es muss doch so was wie updatedata() als befehl geben??

Moderiert von user profile iconTino: Code-Tags hinzugefügt.
Delphianer23 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 156



BeitragVerfasst: Di 04.02.03 16:31 
ok ich probier mal Form1.refresh aus. Ich hab das gesamte repaint der Form abgestellt. (doupple bufferd verschlingt bestimmt auch resourcen)

ja, es funktioniert

Danke Aya :P

Moderiert von user profile iconTino: Leerzeilen entfernt.