• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
wjshan0808

Learn from yesterday, Live for today, For a better tomorrow.
 ————wjshan0808

博客园    首页    新随笔    联系   管理    订阅  订阅
2015年1月19日
遍历系统环境变量的键和值
摘要: //遍历环境变量的键和值 foreach(DictionaryEntry en in Environment.GetEnvironmentVariables()) { en.Key.ToString(); ... 阅读全文
posted @ 2015-01-19 17:29 wjshan0808 阅读(223) 评论(0) 推荐(0)
程序图标不在任务栏上显示
摘要: this.ShowInTaskbar = false; 阅读全文
posted @ 2015-01-19 17:22 wjshan0808 阅读(185) 评论(0) 推荐(0)
获取鼠标位置的颜色值
摘要: Color c = new Color();//创建颜色对象 Bitmap bitmap = new Bitmap(this.BackgroundImage);//创建BITMAP对象 int x = Cursor.Position.X;//鼠标x坐标 ... 阅读全文
posted @ 2015-01-19 17:17 wjshan0808 阅读(1156) 评论(0) 推荐(0)
接触/限制鼠标活动区域
摘要: this.Cursor = new Cursor(Cursor.Current.Handle); Cursor.Position = new Point(Cursor.Position.X,Cursor.Position.Y);//鼠标位置 Cursor.... 阅读全文
posted @ 2015-01-19 17:16 wjshan0808 阅读(309) 评论(0) 推荐(0)
系统的启动模式
摘要: SystemInformation.BootMode 阅读全文
posted @ 2015-01-19 17:10 wjshan0808 阅读(134) 评论(0) 推荐(0)
获取系统用户名
摘要: ManagementClass mc = new ManagementClass("Win32_ComputerSystem");//实例化 ManagementObjectCollection moc = mc.GetInstances();//获取管理对象集合 ... 阅读全文
posted @ 2015-01-19 17:06 wjshan0808 阅读(166) 评论(0) 推荐(0)
获取进程并关闭
摘要: using System.Diagnostics;Process[] myprocess = Process.GetProcesses();//获取进程foreach (Process pro in myprocess) { if (pro.Mai... 阅读全文
posted @ 2015-01-19 17:03 wjshan0808 阅读(198) 评论(0) 推荐(0)
遍历系统中的打印机
摘要: System.Drawing.Printing.PrinterSettings.InstalledPrinters 阅读全文
posted @ 2015-01-19 16:37 wjshan0808 阅读(208) 评论(0) 推荐(0)
获取/设置计算机名字
摘要: using Microsoft.VisualBasic.Devices;//Microsoft.VisualBasic.dll/// /// Sets a new NetBIOS name for the local computer. The name is stored in t... 阅读全文
posted @ 2015-01-19 16:26 wjshan0808 阅读(181) 评论(0) 推荐(0)
设置系统时间
摘要: /// /// Sets the current local time and date. /// /// /// [DllImport("kernel32", CharSet = CharSet.Unicode, Se... 阅读全文
posted @ 2015-01-19 16:24 wjshan0808 阅读(244) 评论(0) 推荐(0)
操作系统信息
摘要: OperatingSystem myOS = Environment.OSVersion;//创建对象 阅读全文
posted @ 2015-01-19 16:03 wjshan0808 阅读(149) 评论(0) 推荐(0)
隐藏/显示任务栏
摘要: /// /// Retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not sear... 阅读全文
posted @ 2015-01-19 15:56 wjshan0808 阅读(177) 评论(0) 推荐(0)
鼠标左右键互换
摘要: /// /// 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... 阅读全文
posted @ 2015-01-19 15:48 wjshan0808 阅读(182) 评论(0) 推荐(0)
系统输入法设置
摘要: InputLanguage.CurrentInputLanguage input=InputLanguage.InstalledInputLanguages[1]; 阅读全文
posted @ 2015-01-19 14:49 wjshan0808 阅读(139) 评论(0) 推荐(0)
清空回收站
摘要: /// /// Empties the Recycle Bin on the specified drive. /// /// A handle to the parent window of any dialog boxes that might be... 阅读全文
posted @ 2015-01-19 14:44 wjshan0808 阅读(139) 评论(0) 推荐(0)
锁定计算机
摘要: //锁定计算机[DllImportAttribute("user32.dll")]public static extern void LockWorkStation();禁止关闭计算机private const int WM_QUERYENDSESSION = 0x0011;//windows消息 ... 阅读全文
posted @ 2015-01-19 14:30 wjshan0808 阅读(162) 评论(0) 推荐(0)
cmd
摘要: Process p = new Process();//创建进程对象 string drivename = cboDrive.Text;//盘符 string shareName = txtShareName.Text;//共享名 ... 阅读全文
posted @ 2015-01-19 14:17 wjshan0808 阅读(176) 评论(0) 推荐(0)
磁盘信息
摘要: using System.Management;using System.IO; //System.Management.dll //创建WMI查询 ManagementObjectSearcher searcher = new ManagementObje... 阅读全文
posted @ 2015-01-19 14:02 wjshan0808 阅读(130) 评论(0) 推荐(0)
Regist
摘要: using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) { key.SetValue... 阅读全文
posted @ 2015-01-19 12:28 wjshan0808 阅读(1337) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3