摘要:
//遍历环境变量的键和值 foreach(DictionaryEntry en in Environment.GetEnvironmentVariables()) { en.Key.ToString(); ... 阅读全文
摘要:
this.ShowInTaskbar = false; 阅读全文
摘要:
Color c = new Color();//创建颜色对象 Bitmap bitmap = new Bitmap(this.BackgroundImage);//创建BITMAP对象 int x = Cursor.Position.X;//鼠标x坐标 ... 阅读全文
摘要:
this.Cursor = new Cursor(Cursor.Current.Handle); Cursor.Position = new Point(Cursor.Position.X,Cursor.Position.Y);//鼠标位置 Cursor.... 阅读全文
摘要:
SystemInformation.BootMode 阅读全文
摘要:
ManagementClass mc = new ManagementClass("Win32_ComputerSystem");//实例化 ManagementObjectCollection moc = mc.GetInstances();//获取管理对象集合 ... 阅读全文
摘要:
using System.Diagnostics;Process[] myprocess = Process.GetProcesses();//获取进程foreach (Process pro in myprocess) { if (pro.Mai... 阅读全文
摘要:
System.Drawing.Printing.PrinterSettings.InstalledPrinters 阅读全文
摘要:
using Microsoft.VisualBasic.Devices;//Microsoft.VisualBasic.dll/// /// Sets a new NetBIOS name for the local computer. The name is stored in t... 阅读全文
摘要:
/// /// Sets the current local time and date. /// /// /// [DllImport("kernel32", CharSet = CharSet.Unicode, Se... 阅读全文
摘要:
OperatingSystem myOS = Environment.OSVersion;//创建对象 阅读全文
摘要:
/// /// Retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not sear... 阅读全文
摘要:
/// /// Reverses or restores the meaning of the left and right mouse buttons. /// /// If this parameter is TRUE, the left button generates right-button messages and the righ... 阅读全文
摘要:
InputLanguage.CurrentInputLanguage input=InputLanguage.InstalledInputLanguages[1]; 阅读全文
摘要:
/// /// Empties the Recycle Bin on the specified drive. /// /// A handle to the parent window of any dialog boxes that might be... 阅读全文
摘要:
//锁定计算机[DllImportAttribute("user32.dll")]public static extern void LockWorkStation();禁止关闭计算机private const int WM_QUERYENDSESSION = 0x0011;//windows消息 ... 阅读全文
摘要:
Process p = new Process();//创建进程对象 string drivename = cboDrive.Text;//盘符 string shareName = txtShareName.Text;//共享名 ... 阅读全文
摘要:
using System.Management;using System.IO; //System.Management.dll //创建WMI查询 ManagementObjectSearcher searcher = new ManagementObje... 阅读全文
摘要:
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) { key.SetValue... 阅读全文