I have heard the Directx Method of capturing is much faster, the problem is I'm no Direct X Guru.
This method uses the getfrontbuffer() method to get the videobuffer to memory.
Here is some code I found on the net.
Code: Select all
Public Sub SaveScreenShot(ByVal sFilename As String)
Dim oSurface As Direct3DSurface8
Dim SrcPalette As PALETTEENTRY
Dim SrcRect As RECT
Dim DispMode As D3DDISPLAYMODE
'get display dimensions
g_oDevice.GetDisplayMode DispMode
'create a surface to put front buffer on,
'GetFrontBuffer always returns D3DFMT_A8R8G8B8
Set oSurface = g_oDevice.CreateImageSurface(DispMode.Width, _
DispMode.Height, _
D3DFMT_A8R8G8B8)
'get data from front buffer
g_oDevice.GetFrontBuffer oSurface
'we are saving entire area of this surface
With SrcRect
.Left = 0
.Right = DispMode.Width
.Top = 0
.Bottom = DispMode.Height
End With
'save this surface to a BMP file
g_oD3DX.SaveSurfaceToFile sFilename, _
D3DXIFF_BMP, _
oSurface, _
SrcPalette, _
SrcRect
End Sub
I would appreciate any help any one could offer.