I can take a "screenshot" from my form(backbufferdata), but is it possible to take only a part of it ? lets say, if my form is 1600x800 px, is it possible to get only 100x100 px ?
int w = GraphicsDevice.PresentationParameters.BackBufferWidth;
int h = GraphicsDevice.PresentationParameters.BackBufferHeight;
//pull the picture from the buffer
int[] backBuffer = new int[w * h];
GraphicsDevice.GetBackBufferData(backBuffer);
//copy into a texture
Texture2D texture = new Texture2D(GraphicsDevice, w, h, true, GraphicsDevice.PresentationParameters.BackBufferFormat);
texture.SetData(backBuffer);
If i change the width en height it gives an error "it's too small or too big".