摘要:
在Form_Load中输入如下代码: foreach(Control ctrl in this.Controls) { if ((ctrl is TextBox) || (ctrl is ComboBox)) //如果文本框或下拉框放在组合框中,你应该用如groupBox1.TextBox { ctrl.KeyDown += new System.Windows.F... 阅读全文
posted @ 2007-02-28 14:16
冷火
阅读(1831)
评论(1)
推荐(0)
摘要:
添加引用 using System.Reflection;using System.Runtime.InteropServices;using System.Diagnostics; 调用DLL文件 [DllImport("User32.dll")]private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);[DllIm... 阅读全文
posted @ 2007-02-28 14:15
冷火
阅读(459)
评论(0)
推荐(0)
摘要:
添加引用 using System;using System.Text;using System.Security.Cryptography;using System.IO; //默认密钥向量private static byte[] Keys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };/// /// DES加密字符串/// //... 阅读全文
posted @ 2007-02-28 14:09
冷火
阅读(3229)
评论(8)
推荐(1)
摘要:
WinForm: public string GetMD5(string str){ byte[] b = System.Text.Encoding.Default.GetBytes(str); b = new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b); StringBuilder... 阅读全文
posted @ 2007-02-28 14:08
冷火
阅读(300)
评论(0)
推荐(0)