06 2013 档案

摘要:Windows 管理规范 (WMI) 是可伸缩的系统管理结构,它采用一个统一的、基于标准的、可扩展的面向对象接口。WMI 为您提供与系统管理信息和基础 WMI API 交互的标准方法。WMI 主要由系统管理应用程序开发人员和管理员用来访问和操作系统管理信息。WMI 可用于生成组织和管理系统信息的工具,使管理员或系统管理人员能够更密切地监视系统活动。例如,可以使用 WMI 开发一个应用程序,用于在 Web 服务器崩溃时呼叫管理员。将 WMI 与 .NET 框架一起使用WMI 提供了大量的规范以便为许多高端应用程序(例如,Microsoft Exchange、Microsoft SQL Serve 阅读全文
posted @ 2013-06-25 18:32 双魂人生 阅读(2524) 评论(0) 推荐(0) 编辑
摘要:private void mainform_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; System.Drawing.Bitmap xzfy = new System.Drawing.Bitmap(Application.StartupPath + "//img/背景.png"); g.DrawImage(xzfy, this.ClientRectangle); } private void loa... 阅读全文
posted @ 2013-06-22 19:51 双魂人生 阅读(4374) 评论(0) 推荐(1) 编辑
摘要:0.新建窗体 及添加按钮1. 执行如下按钮事件 private void btnFormMax_Click(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Maximized) { this.WindowState = FormWindowState.Normal; } else { this.WindowState = FormWindowState.Maximized; } } 窗体最大化时 非全屏 不会遮盖任务栏 此时this.FormBorderStyle 默认为 Sizable2. 执行如下按 阅读全文
posted @ 2013-06-22 19:42 双魂人生 阅读(7414) 评论(0) 推荐(2) 编辑
摘要:当船体设置为FormborderStyle='none'[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport("user32.dll")]public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);public const int WM_SYSCOMMAND = 0x0112;public const int SC_MOVE = 阅读全文
posted @ 2013-06-22 12:06 双魂人生 阅读(611) 评论(0) 推荐(0) 编辑
摘要:DateTime dt = DateTime.Now; //本月第一天时间 DateTime dt_First = dt.AddDays(1 - (dt.Day)); //获得某年某月的天数 int year = dt.Date.Year; int month = dt.Date.Month; int dayCount = DateTime.DaysInMonth(year, month); //本... 阅读全文
posted @ 2013-06-16 12:37 双魂人生 阅读(7019) 评论(0) 推荐(0) 编辑
摘要:private void dgvEmployee_MouseDown(object sender, MouseEventArgs e) { DataGridView.HitTestInfo rows = this.dgvEmployee.HitTest(e.X, e.Y); if (e.Button == MouseButtons.Right) { if (rows.RowIndex > -1 && rows.ColumnIndex > -1) ... 阅读全文
posted @ 2013-06-13 14:47 双魂人生 阅读(291) 评论(0) 推荐(0) 编辑
摘要:/// <summary>为 DataGridView 添加行号。</summary> public static void ShowRows_DataGridView_RowPostPaint(DataGridView dgv, object sender, DataGridViewRowPostPaintEventArgs e) { Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dgv.RowHeadersWidth... 阅读全文
posted @ 2013-06-13 14:43 双魂人生 阅读(328) 评论(0) 推荐(0) 编辑
摘要:方法一: private void txtEmployCode_KeyPress(object sender, KeyPressEventArgs e) { e.Handled = true; if (e.KeyChar >= '0' && e.KeyChar <= '9') { e.Handled = false; } }方法二: public static void NumberAccpter(object sender, Ke... 阅读全文
posted @ 2013-06-13 14:40 双魂人生 阅读(2347) 评论(0) 推荐(1) 编辑
该文被密码保护。
posted @ 2013-06-13 14:35 双魂人生 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2013-06-13 12:19 双魂人生 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2013-06-12 16:47 双魂人生 阅读(0) 评论(0) 推荐(0) 编辑
摘要:禁止Form窗口调整大小方法:FormBorderStyle 设为FixedSingle;不能使用最大化窗口: MaximuzeBox 设为False;不能使用最小化窗口:MinimizeBox 设为False;禁止combobox输入方法:将DropDownStyle 设为DropDownList 阅读全文
posted @ 2013-06-10 10:15 双魂人生 阅读(23279) 评论(0) 推荐(1) 编辑
摘要:反编译工具:http://files.cnblogs.com/shuang121/reflector.zip插件http://files.cnblogs.com/shuang121/Reflector.FileDisassembler.zip安装插件这个在平时的学习和项目开发中用处很大,但是只限于没有被混淆代码。 阅读全文
posted @ 2013-06-06 22:25 双魂人生 阅读(214) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Windows.Forms;using XLuSharpLibrary.DbAccess;using System.Runtime.InteropServices;//使用DllImport的必须。using System.Diagnostics;//引入Process 类namespace BHair{ static class Program { private const int WS_SHOWNORMAL = 1; [DllImp... 阅读全文
posted @ 2013-06-06 16:10 双魂人生 阅读(701) 评论(0) 推荐(0) 编辑
摘要:首先,添加托盘控件,在vs工具箱里直接把notifyIcon拖到主界面即可 其次、进行一系列的操作,比如双击打开,退出等 /// <summary> /// 显示托盘图标 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mainform_Resize(object sender, EventArgs e) { if (this.WindowS... 阅读全文
posted @ 2013-06-06 11:41 双魂人生 阅读(619) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示