SoFunction
Updated on 2025-03-07

Code examples to implement drawing effects on screen using C#


//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));
}