SPI(System Parameters Information)
摘要:#region SPI /// /// SPI_ System-wide parameter - Used in SystemParametersInfo function /// [System.ComponentModel.Description("SPI_(System-wide parameter - Used in SystemParametersInfo ...
阅读全文
posted @
2008-09-05 17:47
迷你软件
阅读(680)
推荐(0)
Winform下载文件
摘要:/// /// 下载文件 /// /// 下载文件地址 /// 下载后的存放地址 /// 用于显示的进度条 public void DownloadFile(string URL, string filename, System.Windows.Forms.ProgressBar prog) ...
阅读全文
posted @
2008-09-05 17:35
迷你软件
阅读(5146)
推荐(1)
C#编程规范
摘要:目录 第一章 概述.... 4 规范制定原则... 4 术语定义... 4 Pascal 大小写... 4 Camel 大小写... 4 文件命名组织... 4 1.3.1文件命名... 4 1.3.2文件注释... 4 第二章 代码外观.... 6 2.1 列宽... 6 2.2 换行... 6 2.3 缩进... 6 2.4 空行... 6 ...
阅读全文
posted @
2008-08-25 13:48
迷你软件
阅读(361)
推荐(0)
将字节数组转换为十六进制值字符串时 Byte 的用法
摘要:class HexTest{ static char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; public static string ToHexString(byte[] bytes) {
阅读全文
posted @
2008-08-10 11:34
迷你软件
阅读(1495)
推荐(0)
ServiceController类
摘要:下面创建一个小的Windows应用程序,该应用程序使用ServiceController类监视和控制Windows服务。 创建一个Windows窗体应用程序,这个应用程序的用户界面包含一个显示所有服务的列表框、4个文本框(分别用于显示服务的显示名称、状态、类型和名称),以及4个发送控制事件的按钮,如图32-18所示。 图 32-18 这里使用了System.ServiceProcess.Ser...
阅读全文
posted @
2008-07-16 10:53
迷你软件
阅读(845)
推荐(0)
ListView VirtualMode 示例
摘要:using System;using System.ComponentModel;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Diagnostics;namespace ListViewVirtualMode{ public partial class Form1 : Form ...
阅读全文
posted @
2008-07-02 17:12
迷你软件
阅读(3645)
推荐(1)
微软.Net开发中的多线程编程总结(转)
摘要:本文将对微软.Net开发中的多线程编程进行一个简单的总结。 不需要传递参数,也不需要返回参数 我们知道启动一个线程最直观的办法是使用Thread类,具体步骤如下: ThreadStart threadStart=new ThreadStart(Calculate);Thread thread=new Thread(threadStart); thread.Start(); pu...
阅读全文
posted @
2008-07-02 15:11
迷你软件
阅读(671)
推荐(0)
C# 常用正则表达式
摘要:/// /// 判断是否为正确的IP地址,IP范围(0.0.0.0~255.255.255) /// /// 需验证的IP地址 /// public bool IsIP(String ip) { return System.Text.RegularExpressions....
阅读全文
posted @
2008-06-26 12:46
迷你软件
阅读(474)
推荐(0)
在C#中实现对ListView点击列标题自动排序功能
摘要:先定义一个ListViewHelper类,代码如下: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System;using System.Collections;using System.Windows.Forms;names...
阅读全文
posted @
2008-06-24 10:59
迷你软件
阅读(8415)
推荐(2)
DataGridView单元格代码控制
摘要:using System;using System.Drawing;using System.Windows.Forms;namespace DataGridViewTest{ public partial class Form1 : Form { private DataGridView dataGridView1 = new DataGridView(); ...
阅读全文
posted @
2008-06-19 09:28
迷你软件
阅读(1157)
推荐(1)
通过rundll32调用系统对话框
摘要:例:系统锁定(win+L) using System;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { System.Diagnostics.Process p = new System.Diagnostics.Process...
阅读全文
posted @
2008-06-06 14:49
迷你软件
阅读(507)
推荐(0)
c#中通过设置钩子监视鼠标移动
摘要:摘自http://blog.csdn.net/jinjazz/archive/2008/04/16/2298699.aspx using System;using System.Windows.Forms;using System.Runtime.InteropServices;namespace HotelManage{ public partial class Form1 : Form ...
阅读全文
posted @
2008-06-06 14:42
迷你软件
阅读(394)
推荐(0)
C#访问数据库类
摘要:using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.Common;using System.Configuration;using System.Collections;namespace DBUtility{ public class Data...
阅读全文
posted @
2008-06-02 15:28
迷你软件
阅读(855)
推荐(0)
C#集合示例
摘要:using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { // Create a new dictiona...
阅读全文
posted @
2008-06-02 11:41
迷你软件
阅读(440)
推荐(0)
C# WinForm 中在窗口标题栏上加按钮(转)
摘要:作者:袁晓辉主页:http://www.farproc.comBLOGhttp://blog.csdn.net/uoyevoli/ 在窗口标题栏上加按钮本来不是什么新鲜事了,我在VC++下早也实现过了(相信很多人也都实现过了)。今天一个朋友问我C# WinForm下可否实现,我就顺便拿C#写了一个。 原理是一样的,都是重写窗口过程(WndProc),处理一些非客户区消息(WM_NCxx...
阅读全文
posted @
2008-06-02 10:13
迷你软件
阅读(1358)
推荐(0)
C#获得汉字的首字母
摘要:using System;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { while (true) { string text = Co...
阅读全文
posted @
2008-05-29 13:10
迷你软件
阅读(623)
推荐(0)
C# 常用代码
摘要://获取系统文件夹string folder = System.Environment.GetFolderPath(Environment.SpecialFolder.System); //绑定系统进程 private void BindProcess() { try { Syst...
阅读全文
posted @
2008-05-26 18:24
迷你软件
阅读(716)
推荐(0)
C#中无边框窗体改变大小
摘要:const int WM_NCHITTEST = 0x0084; const int HTLEFT = 10; const int HTRIGHT = 11; const int HTTOP = 12; const int HTTOPLEFT = 13; const int HTTOPRIGHT = 14; ...
阅读全文
posted @
2008-05-05 17:40
迷你软件
阅读(1287)
推荐(0)
C#中无边框窗体移动
摘要:拖动无边框窗体Form至桌面任何位置首先建一个Windows应用程序将Form1的 FormBorderStyle属性设置为Noe Point mouseOff;//鼠标移动位置变量 bool leftFlag;//标签是否为左键 private void Form1_MouseDown(object sender, MouseEventArgs e) ...
阅读全文
posted @
2008-05-05 16:43
迷你软件
阅读(6734)
推荐(0)
C#中XML的基本操作
摘要:我用的是一种很笨的方法,但可以帮助初学者了解访问XML节点的过程。 已知有一个XML文件(bookstore.xml)如下: Oberon's Legacy Corets, Eva 5.95 1、往节点中插入一个节点: XmlDocument xmlDoc=new XmlDocument(); xmlDoc.Load("bookstore.xml")...
阅读全文
posted @
2008-04-10 10:08
迷你软件
阅读(275)
推荐(0)