//The name space where DllImport is located
using ;
[DllImport("")]
public extern static GetDC( hWnd);
private void button19_Click(object sender, EventArgs e)
{
DesktopHandle = GetDC();
Graphics g = (DesktopHandle);
(new Pen(),new Rectangle(10,10,100,100));
}