.net
文章平均质量分 55
dragon
这个作者很懒,什么都没留下…
展开
-
C#设置快捷键
要设置快捷键必须使用user32.dll下面的两个方法。 BOOL RegisterHotKey( //注册系统热键的API函数 HWND hWnd, int id, UINT fsModifiers, UINT vk ); BOOL UnregisterHotKey( //删除系统热键的API函数 HWND hWnd, int id ); 在C#中引用命名空间System.Runti转载 2007-09-05 14:18:00 · 2195 阅读 · 0 评论 -
c#.net常用函数和方法集
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 in转载 2007-09-05 14:20:00 · 419 阅读 · 0 评论 -
C#中汉字转拼音类
public class chs2py { private static int[] pyvalue=new int[]{-20319,-20317,-20304,-20295,-20292,-20283,-20265,-20257,-20242,-20230,-20051,-20036,-20032,-20026,转载 2007-09-06 18:20:00 · 544 阅读 · 0 评论 -
.net 序列化文件(图像)成xml
Imports System.Xml.SerializationImports System.XmlImports System.DrawingImports System.IO.FileImports System.IOPublic Class SendImageReportXml 图像信息 Public img1 As Object Public img2 As Ob原创 2007-09-06 18:29:00 · 722 阅读 · 1 评论 -
.net WEB加载时添加进度条实例
1、添加 引用using System.Threading;2、在页面加载时 protected void Page_Load(object sender, EventArgs e) {////////////////////以下是进度条 Response.Write(""); Response.Write("_"); Response.Write("");原创 2007-09-10 18:06:00 · 1800 阅读 · 1 评论 -
.net 图像上传源代码(转载)
++++++++++++++++++++++以下为读取代码HttpPostedFile UpFile=Pic.PostedFile;//读取数据 FileLength=UpFile.ContentLength;//取得数据的长度//判断是不是上传了图片 if(FileLength==0) {转载 2007-09-10 18:31:00 · 853 阅读 · 2 评论 -
Asp.net日期字符串格式化显示
我们经常会遇到对时间进行转换,达到不同的显示效果,默认格式为:2006-6-6 14:33:34 如果要换成成200606,06-2006,2006-6-6或更多的格式该怎么办呢?这里将要用到:DateTime.ToString的方法(String, IFormatProvider)示例:using System;using System.Globalization;String format="转载 2007-09-24 10:30:00 · 594 阅读 · 0 评论