PDA

View Full Version : حرفه ای: قفل کردن کامل کامپیوتر با C#



amir22448
یک شنبه 08 مرداد 1391, 16:13 عصر
با این کد شما می تونید کامپیوتر را به کلی قفل کنید.اگه دقت کنید من یه فایل ویندوز رو که قابلیت قفل کردن رو داره رو اجرا می کنم.


کد:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Sajid.LockComputer
{
class Program
{
static void Main(string[] args)
{
Process.Start(@"C:\WINDOWS\system32\rundll32.exe", "user32.dll,LockWorkStation") ;
}
}
}