How to take a screen shot?

Started by
2 comments, last by Le0 21 years ago
How can i implement a screenshot key to my tetris? because when i press printscreen, i get a screen of my game that is half drawn and with the wrong colors
"The bible is probably the most genocidal book ever written!" Noam Chomsky
Advertisement
Generating screenshot in DX 8.1

Vikke Matikainen
Vikke Matikainen
- create a Surface
- GetFrontBuffer( created surface )
- D3DXSaveSurfaceToFile( create surface )

This saves the complete front buffer to a file.

If you only want to save the content of your own window try to use the following functions:
- GetClientRect
- ClientToScreen
I find that algorithm ("Generating screenshot in DX 8.1") quite slow when it comes to doing it in real-time... Are they are other ways of doing it? When I did it, it took about one and a half seconds just to take one shot....

I made it search through a directory for a free shotxxxx.* file and write it to that. I''ll check that source again to make sure it''s not the prob...

....... Ummmm, Wait a sec!!! I had F12 take the shots. I think I''d better put a time delay between shots. That might be it. I''ll do that when I get home.


- Rob Loach
Current Project: Upgrade to .NET and DirectX 9

"Do or do not. There is no try."
- Yoda
Rob Loach [Website] [Projects] [Contact]

This topic is closed to new replies.

Advertisement