松鼠的博客

导航

统计

文章分类 -  .NET-Form

数据库连接字符串
摘要:相关参考: http://www.connectionstrings.com/ 阅读全文

posted @ 2008-12-16 09:19 Xproer-松鼠 阅读(135) 评论(0) 推荐(0) 编辑

c#获取文件md5值
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.Collections.Generic; using System.Text; using System.IO; namespace MyHash ... 阅读全文

posted @ 2008-10-23 09:16 Xproer-松鼠 阅读(687) 评论(1) 推荐(0) 编辑

C#中路径相关操作
摘要:1、判定一个给定的路径是否有效,合法 通过Path.GetInvalidPathChars或Path.GetInvalidFileNameChars方法获得非法的路径/文件名字符,可以根据它来判断路径中是否包含非法字符; 2、如何确定一个路径字符串是表示目录还是文件 使用Directory.Exists或File.Exist方法,如果前者为真,则路径表示目录;如果后者为真,则路径表示文件... 阅读全文

posted @ 2008-07-07 13:23 Xproer-松鼠 阅读(830) 评论(0) 推荐(0) 编辑

通过HTTP协议使用断点继续
摘要:HttpWebRequest web = (HttpWebRequest)WebRequest.Create(url); web.AddRange(100);//此方法设置Range值 可以直接使用GetResponseStream方法读取返回数据。服务器响应的消息已被HttpWebReqeust格式化过了。 阅读全文

posted @ 2008-03-19 15:55 Xproer-松鼠 阅读(250) 评论(0) 推荐(0) 编辑

AxShDocVw, SHDocVw, mshtml References
摘要:I've been embedding the IE component in Windows.Forms apps for some time now but need to do it fairly infrequently. Each time I have to start a new project, I always forget how to add references in m... 阅读全文

posted @ 2008-02-02 21:09 Xproer-松鼠 阅读(577) 评论(0) 推荐(0) 编辑

[CSharp]数字格式化输出
摘要:int a = 12345678; //格式为sring输出 // Label1.Text = string.Format("asdfadsf{0}adsfasdf",a); // Label2.Text = "asdfadsf"+a.ToString()+"adsfasdf"; // Label1.Text = string.Format("asdfadsf{0:C}ad... 阅读全文

posted @ 2008-01-30 17:57 Xproer-松鼠 阅读(448) 评论(0) 推荐(0) 编辑

高亮语法编辑器
摘要:http://www.chenjiliang.com/Article/View.aspx?ArticleID=2956&TypeID=88 阅读全文

posted @ 2008-01-09 21:34 Xproer-松鼠 阅读(161) 评论(0) 推荐(0) 编辑

ListBox坐标
摘要:private void CreateEditBox(object sender) { listBox1= (ListBox)sender ; itemSelected = listBox1.SelectedIndex ; Rectangle r = listBox1.GetItemRectangle(itemSelected); string itemText = (string)list... 阅读全文

posted @ 2008-01-08 10:30 Xproer-松鼠 阅读(205) 评论(0) 推荐(0) 编辑

.NET加密解密函数
摘要: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-12-12 19:09 Xproer-松鼠 阅读(1784) 评论(0) 推荐(0) 编辑

HTML文件转CHM文件类
摘要:在工作中常常需要将特定的文件提取出来生成CHM格式文件便于查阅,例如将函数头提取出生成CHM文档。 下面的HtmlToChmClass类实现将FilePath目录下的HTML文件转化为CHM文档。 HtmlToChmClass可以很方便的运用于C#中界面程序。只需要调用相应的接口,实现与界面设计分离。 /*... 阅读全文

posted @ 2007-11-28 11:14 Xproer-松鼠 阅读(504) 评论(0) 推荐(0) 编辑

C#中的@符号的使用及注意事项
摘要:编程中很多细节问题,我们都要十分的注意,要不一个小小的字母错误就能引起程序的无法运行,我自己就经历过这样的事情,对于编程中应该注意的问题,我们要经常的收集整理自己的一本手册,现在我们来讲下C#中的@符号的使用及注意事项。 阅读全文

posted @ 2007-10-31 11:10 Xproer-松鼠 阅读(816) 评论(0) 推荐(0) 编辑

关于RichTextBox 及 RTF格式文件的保存
摘要:C# Visual Studio 2005中RichTextBox保存文件为rtf格式 SaveFileDialog saveFile1 = new SaveFileDialog(); // Initialize the SaveFileDialog to specify the RTF extention for the file. saveFile1.DefaultExt = "*.rtf"; saveFile1.Filter = "RTF Files|*.rtf"; // Determine whether the user selected a file name from the saveFileDialog. if (saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK && saveFile1.FileName.Length 0) { // Save the conte 阅读全文

posted @ 2007-10-30 18:21 Xproer-松鼠 阅读(1902) 评论(0) 推荐(0) 编辑

Visual C#创建和使用ActiveX组件
摘要:开发基于.Net平台上的程序员是很难从本质上把Visual C#和ActiveX组件联起来,虽然在使用Visual C#开发应用程序时,有时为了快速开发或者由于.Net FrameWork SDK的不完整,还需要借助ActiveX。但即使如此,也很难把二者联系起来。其中的原因就是能够被Visual C#直接使用文件和通过Visual C#生成的可执行程序只可能是托管的文件。而Active X组... 阅读全文

posted @ 2007-10-08 19:34 Xproer-松鼠 阅读(274) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示