/// 〈summary〉/// 汉字转拼音缩写/// 2004-11-30/// 〈/summary〉/// 〈param name="str"〉要转换的汉字字符串〈/param〉/// 〈returns〉拼音缩写〈/returns〉public string GetPYString(string str){ string tempStr = "";; foreach(char c in str) { if((int)c 〉= 33 && (int)c 〈=126) {//字母和符号原样保留 tempStr += c.ToString( Read More
posted @ 2011-08-04 13:00 slcands Views(238) Comments(0) Diggs(1) Edit
Test.csusing System;using System.Drawing;using System.Windows.Forms;using System.Runtime.InteropServices;using System.Reflection;namespace ColorCursor{/// <summary>/// 本例子的作用:/// 在.NET中实现彩色光标,动画光标和自定义光标。/// </summary>public class Form1 : System.Windows.Forms.Form{[DllImport("user32. Read More
posted @ 2011-08-04 12:56 slcands Views(157) Comments(0) Diggs(0) Edit
using System.Runtime.InteropServices;using System.Drawing;using System.Drawing.Imaging;namespace PickHead{/// <summary>/// 一个控制摄像头的类/// </summary>public class Pick{private const int WM_USER = 0x400;private const int WS_CHILD = 0x40000000;private const int WS_VISIBLE = 0x10000000;private Read More
posted @ 2011-08-04 12:55 slcands Views(477) Comments(0) Diggs(1) Edit
ColorMatrix (彩色矩阵) 类位于System.Drawing.Imaging命名空间 先看看下面的代码ColorMatrix cm = new ColorMatrix(new float[][]{ new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0.5f,0.5f,0.5f,0,0},new float[]{0,0,0,1,0,0},new float[]{0,0,0,0,1,0},new float[]{0,0,0,0,0,1}});矩阵系数组成一个 5x5 的线性转换,用于转 Read More
posted @ 2011-08-04 12:51 slcands Views(273) Comments(0) Diggs(1) Edit
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer(); StopRectTimer.Tick += new EventHandler(timer1_Tick); StopRectTimer.Interval = 50; StopRect. Read More
posted @ 2011-08-04 12:48 slcands Views(227) Comments(0) Diggs(0) Edit
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace 图形动画...{ public partial class Form1 : Form ...{ public Form1() ...{ InitializeComponent(); } private void Form1_Load(object sender, Read More
posted @ 2011-08-04 12:46 slcands Views(943) Comments(0) Diggs(2) Edit