You need directx or opengl for that, in c#, i dunno how that would work though. All you have to do is create a texture once, then replace it with the new one each frame, then draw it on a quad the size of the screen, using the texture above.
As for the alpha channel, i can post all my code but it's in c++
//-----------------------------------------------------------------------------
// Draw the cursor
//-----------------------------------------------------------------------------
void CScreenShot::DrawCurcor(HDC hDC)
{
CURSORINFO CursorInfo;
CursorInfo.cbSize = sizeof(CURSORINFO);
GetCursorInfo(&CursorInfo);
static DWORD Version = WinVer.DetectWindowsVersion();
//static HCURSOR hCur = LoadCursor(NULL, IDC_ARROW);
DWORD CursorWidth = GetSystemMetrics(SM_CXCURSOR);
DWORD CursorHeight = GetSystemMetrics(SM_CYCURSOR);
POINT CursorPos;
GetCursorPos(&CursorPos);
// Needed for XP or older windows
if(Version < _WIN_VISTA_){
CursorPos.x -= CursorWidth >> 2;
CursorPos.y -= CursorHeight >> 2;
}
DrawIconEx(hDC, CursorPos.x, CursorPos.y, CursorInfo.hCursor, CursorWidth, CursorHeight, 0, NULL, DI_NORMAL);
}
//-----------------------------------------------------------------------------
// Take a screenshot, extract it to a buffer in 24 bits, and compress it
//-----------------------------------------------------------------------------
int CScreenShot::GenMPEGScreenShot(CVideoEncoder *pVideoEncoder, BOOL ShowCursor)
{
HWND hDesktopWnd = GetDesktopWindow();
HDC hdc = GetDC(hDesktopWnd);
int x = 0;
int y = 0;
int w = GetSystemMetrics(SM_CXSCREEN);
int h = GetSystemMetrics(SM_CYSCREEN);
HDC s_hdc = CreateCompatibleDC(hdc);
HBITMAP hbmp = CreateCompatibleBitmap(hdc, w,h);
HBITMAP ex_hbmp = (HBITMAP)SelectObject(s_hdc, hbmp);
/////////////////////////////////////////////////////////////////////////////////////////
// Copy the screen image in our bitmap
BitBlt(s_hdc, x,y,w,h, hdc, x,y, SRCCOPY);
// Draw the cursor over the image
if(ShowCursor)
DrawCurcor(s_hdc);
ReleaseDC(hDesktopWnd, hdc);
/////////////////////////////////////////////////////////////////////////////////////////
// Create pointers to our buffers object
CRawBuffer *pSrc = &Buffers.MPEG.ScreenShot;
CRawBuffer *pDst = &Buffers.MPEG.Encoded;
// Allocate buffers
DWORD NumPixels = w * h;
if(pSrc->GetBufferSize() != NumPixels * 3)
pSrc->Allocate(NumPixels * 3);
// Allocate a BITMAPINFO buffer
LPBITMAPINFO lpbi = (LPBITMAPINFO)(new BYTE[BMISize]);
ZeroMemory(lpbi, sizeof(BITMAPINFO));
lpbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
// De-select our hbmp
SelectObject(s_hdc, ex_hbmp);
// Get information about the screenshot image format
GetDIBits(s_hdc, hbmp, 0, h, NULL, lpbi, DIB_RGB_COLORS);
lpbi->bmiHeader.biCompression = BI_RGB;
// Make sure it's gonna be extracted in 24 bits format
lpbi->bmiHeader.biBitCount = 24;
lpbi->bmiHeader.biSizeImage = NumPixels * 3;
// Extract the image in 24 bits format
GetDIBits(s_hdc, hbmp, 0, h, pSrc->GetBuffer(), lpbi, DIB_RGB_COLORS);
// Delete the BITMAPINFO buffer
SAFE_DELETE_ARRAY(lpbi);
// Release the bitmap handles
if(SelectObject(s_hdc, hbmp)){
DeleteObject(hbmp);
DeleteDC(s_hdc);
}
/////////////////////////////////////////////////////////////////////////////////////////
// Convert from BGR to RGB
Convert24bitsBGRTORGB(pSrc->GetBuffer(), pSrc->GetBufferSize());
/////////////////////////////////////////////////////////////////////////////////////////
// Compress the frame using ffmpeg
int FrameSize = pVideoEncoder->EncodeFrame(pDst->GetBuffer(6), pSrc->GetBuffer(), pSrc->GetBufferSize());
// Write the packet header
WORD MsgID = MSG_MP1_IMG_REQUEST;
memcpy(pDst->GetBuffer(0), &FrameSize, sizeof(DWORD));
memcpy(pDst->GetBuffer(4), &MsgID, sizeof(WORD));
// Free our source buffer
pSrc->Free();
// Return compressed buffer size
Size = FrameSize;
return Size;
}