- 博客(20)
- 资源 (5)
- 收藏
- 关注
原创 des加密文件
private void button1_Click(object sender, EventArgs e) { DES des = new DESCryptoServiceProvider(); EncryptData("1.txt", "2.txt", des.Key, des.IV);
2007-03-16 17:57:00
878
原创 输入中文字符的问题(imemode属性);
我们在输入数字的时候,会不小心输入中文的粗体数字如123这是我们不希望的只要将imemode 属性改为 off 就可以了附:imemode的值。Alpha 字母数字单字节字符 (SBC)。此设置仅对朝鲜语和日语 IME 有效。 AlphaFull 字母数字双字节字符。此设置仅对朝鲜语和日语 IME 有效。 Disable IME 被禁用。如果使用此设置,则用户无法从键盘打开 IME,而
2007-02-11 11:53:00
2391
原创 动态加载插件
string path = Application.StartupPath; path = path + "//myApp.dll"; Assembly assembly = Assembly.LoadFrom(path ); //获得类(型) Type type = assembly.Ge
2007-02-06 17:58:00
780
原创 C# 中的事务(提高速度,避免频繁链接数据库)
C# 中的事务(提高速度,避免频繁链接数据库)没事的时候看看msdn对自己很有帮助。多学习些东西。 OleDbConnection con = new OleDbConnection(); con.ConnectionString = mycon.ConnectionString(); OleDbTransact
2007-01-26 13:40:00
1284
转载 验证手机号码,小灵通号码函数
验证手机号码,小灵通号码函数/// /// 判断是否是手机号码,小灵通号码/// /// /// public static bool IsMobileNum(string input){ RegexOptions options = RegexOptions.Multiline; Regex regex = new Regex(@"(^13/d{8,9}$)|(^153
2007-01-26 13:34:00
1078
原创 递归得到叶子节点。
private void getAllNode(TreeNode treeNode,ref string list)//递归得到叶子节点。 { list = treeNode.Name + ","+list ;// 得到所有的叶子节点的名字,按值传递。 if (treeNode.Nodes.Count != 0)
2007-01-12 20:04:00
1288
原创 excel 导入导出access数据库(winform)
研究了好几天得出的最简单的方法。唉,头都大了。//从excel导入到数据库。 OleDbConnection conExcel = new OleDbConnection(); try { OpenFileDialog openFile = new OpenFileDialog();//打开文件
2006-12-28 15:26:00
3143
3
转载 实现窗体淡入淡出的完整代码
private bool isclose=false; private bool canclose=false; private void timer1_Tick(object sender, System.EventArgs e) { if(this.Opacity { if(this.isclose) { this.timer1.Enabled=fal
2006-12-25 19:31:00
961
转载 用Visual C#编写仿MSN Messager的滚动提示窗口
http://www.microsoft.com/china/community/Column/64.mspx 大家一定都用过MSN Messager了吧?每当有新邮件或者是新消息到来的时候,MSN Messager便会从右下角升起一个小窗口提醒您,然后又降下去。当你在聚精会神的在电脑上做一件事的时候,一定不会喜欢突然被"咚"一下出现在屏幕中心的对话框打扰,它的这种设计不但非常体贴用户,
2006-12-20 19:48:00
673
原创 定义 xp风格的按钮
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace clMessage{ public partial c
2006-12-20 18:15:00
739
原创 窗体渐出
private void timer1_Tick_1(object sender, EventArgs e)//登陆窗体渐出。 { if (this.Opacity { this.Opacity = this.Opacity + 0.1; } else
2006-12-20 14:31:00
677
转载 c# 8条语句实现屏幕抓图
Image myImage = new Bitmap(300, 200);Graphics g = Graphics.FromImage(myImage);g.CopyFromScreen(new Point(Cursor.Position.X - 150, Cursor.Position.Y - 25), new Point(0, 0), new Size(300, 200
2006-12-19 20:29:00
664
转载 体验VS.NET 2005的winform新功能
2005年4月,Visual Studio.NET 2005 beta 2版终于发布了。在这个版本中,除了.net framework 2.0在语言特性等方面有了很大的增强外,在Visual Studio.NET 2005本身,也增加了很多新的功能,使的无论在winform还是webform的开发上,都大为方便。在本文中,将以最新的beta 2版本为蓝本,介绍Visual Studio.NET 2
2006-12-18 20:40:00
777
转载 如何在C#的WinForm中制作饼状图和柱状图
当我们的软件需要各种饼状图和柱状图来表示数据时,我们或许会想到用Offices中的图形控件或是第三方控件,但现在的第三方控件大都需要注册,有些免费的控件会有开发商的标记等。而对于使用Offices的图形控件来说,并不能在程序中得于很好控制,其使用的简易程度也较低,所以在这我给出在C#中使用GDI+实现饼状图
2006-12-18 20:21:00
1259
转载 如何用C#写一个简单的Login窗口
最近,看到网上经常会问如何进行窗口跳转,大多数的问题都是牵扯到Login窗口。其实,在Visual Studio 6以来,比较正确的做法,是判断Login窗口的返回值,然后决定是否打开主窗体,那么在C#中也是一样的。 具体做法如下:首先,创建Login窗口,然后添加相应的输入框和按钮,设置窗口的AcceptButton为窗体的确认按钮,而CancelButton为窗体的取消按钮。
2006-12-18 19:50:00
853
原创 winform(C#)调用dll
引用命名空间using System.Runtime.InteropServices; [DllImport("test.dll", EntryPoint = "TestFunction1")] 应用dll ,定义入口。 public static extern int TestFunction1(ref string eOut);//继承函数。
2006-12-18 19:32:00
2603
转载 DataGridView新特色(vs2005)
1、自定义列 Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their
2006-12-16 20:48:00
833
原创 (datagridview)如果单击列表头,全选.(第一列为复选框)
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 )//如果单击列表头,全选. { int i; for (i = 0;
2006-12-16 20:35:00
7823
4
转载 在DataGridView中显示行号
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { // 在DataGridView中显示行号 using (SolidBrush b = new SolidBrush( this.dataGridView
2006-12-16 20:32:00
1174
转载 文本框里只能输入数字和退格键
private void txtAddTel_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar))//文本框里只能输入数字和退格键. { e.Handled = true;
2006-12-16 20:30:00
1524
1
精通CSS滤镜
2007-10-10
XdictGrb.dll 下载
2007-07-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人