上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 37 下一页
摘要: 要让一个Windows Form的TextBox显示多行文本就得把它的Multiline属性设置为true。 这个大家都知道,可是当你要在代码中为Text属性设置多行文本的时候可能会遇到点麻烦:)C# TextBox换行时你往往会想到直接付给一个含有换行符"\n"的字符串给Text属性:aTextBox.Text="FirstLine\nSecondLine\nThirdLine";可是实际运行的... 阅读全文
posted @ 2010-02-15 12:32 猪悟能 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 源代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Net;u... 阅读全文
posted @ 2010-02-15 12:31 猪悟能 阅读(1106) 评论(1) 推荐(0) 编辑
摘要: 源代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Diagnos... 阅读全文
posted @ 2010-02-15 12:30 猪悟能 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 源代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Diagnos... 阅读全文
posted @ 2010-02-15 12:29 猪悟能 阅读(237) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;u... 阅读全文
posted @ 2010-02-15 12:28 猪悟能 阅读(705) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Drawing;using System.Windows.Forms;using System.Threading;namespace hackpig{ public class myFormControl : Form { public delegate void addListItem(String str1); public addList... 阅读全文
posted @ 2010-02-15 12:27 猪悟能 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 图1 带EventArgs的委托演示图2 不带EventArgs的委托演示 本例源代码下载:1。不带参数的委托2。带参数的委托带EventArgs的委托演示例程源代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;u... 阅读全文
posted @ 2010-02-15 12:26 猪悟能 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 在我们的程序中,经常会有一些耗时较长的运算,为了保证用户体验,不引起界面不响应,我们一般会采用多线程操作,让耗时操作在后台完成,完成后再进行处理或给出提示,在运行中,也会时时去刷新界面上的进度条等显示元,必要进,还要控制后台线程中断当前操作。以前,类似的应用会比较麻烦,需要写的代码较多,也很容易出现异常。在 .net中,提供了一个组件 backgroundworker就是专门解决这个问题的。使用这... 阅读全文
posted @ 2010-02-15 12:25 猪悟能 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 在程序中,进行类型转换是常见的事。那么在C#中支持以前语言的类型转换方法,即用类型名进行强行转换,例如:object objTest = new NewType();NewType newValue = (NewType)objTest;但是这样转换,有个严重的问题,就是在把objTest强转换成NewType类型对象的时候,这个过程是不安全的,因此需要用try-catch语句来进行保护。这样一来... 阅读全文
posted @ 2010-02-15 12:24 猪悟能 阅读(422) 评论(0) 推荐(1) 编辑
摘要: 上接<反流技术之IE插件技术研究第一部分>: http://blog.csdn.net/davemin/archive/2007/01/05/1474858.aspx 申明: 本文涉及到的技术只供参考研究之用,不可用于非法行为,本人不负责。2.3. BHO 示例 A. 下面我讲下,如何使用Micro 阅读全文
posted @ 2010-02-15 12:20 猪悟能 阅读(373) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 37 下一页