shake demo

Click to shake the box.

Wednesday, 24 December 2014

LOCK PC using C# code

using System.Runtime.InteropServices;


 public partial class Trends : System.Web.UI.Page
    {
[DllImport("user32.dll")]
        public static extern void LockWorkStation();

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
               
            }
        }

public static void LockScreen()
        {
            LockWorkStation();
        }
        protected void btnLockPC_Click(object sender, EventArgs e)
        {

            LockScreen();
       
        }
}

No comments:

Post a Comment