VC#
raiky_wu
4月1日愚人节,全世界都知道的秘密。2009年也是个不怎么幸运的一年,2009年的这一天我的生活却有了彻底的改变。不知道是不是一个笑话。。。不管怎么样还算是幸运的,在新的起点重新开始。。。
展开
-
Windows窗口中的资源如何被其他线程访问
引入当Windows窗口调用一个新的线程,而新的线程希望往窗口线程回传一些数据,访问控件。这时如果直接使用原窗口资源,编译可以通过,但执行时会报错。"Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on."例如:void myBu原创 2009-08-12 17:10:00 · 621 阅读 · 0 评论 -
message box
【函数】 MessageBox( Text, Title, nType,MessageBoxIcon);【函数说明】 弹出一个消息框。【语法】参数:Text ,消息框的正文;Title ,消息框的标题;nType ,消息框的类型。返回值:,用户在消息框上点击关闭时的选择的按钮。转载 2009-09-15 15:34:00 · 365 阅读 · 0 评论 -
正则表达式
正则表达式在英文中写作(Regular Expression),根据正则表达式的使用范围和单词意思,.NET将其命名空间设置为System.Text.RegularExpressions; 下面就来研究C#中的正则表达式,C#中的正则表达式包含在.NET基础雷库的一个名称空间下,这个名称空间就是System.Text.RegularExpressions。该名称空间包括8个类,1转载 2009-09-15 15:40:00 · 268 阅读 · 0 评论 -
设置Richtext控件光标位置到当前位置
当使用richtext 控件时,如果一次写入的文本内容过大,光标通常会被自动设置在最后,但是当前窗口之显示开始的位置,没有设置到文本的末尾。解决:设置text的selectionStartLog.SelectionStart = Log.Text.Length - 1;//Selectionstart: set or get the starting point of the te原创 2009-09-15 16:05:00 · 490 阅读 · 0 评论 -
delegage and event
1 Create Parameter class for Event 1 Create a class : this may not needed if you don’t want to transfer data,it used to transfer the data to the event public class MyArgs :EventArgs // event argu原创 2009-09-15 15:17:00 · 264 阅读 · 0 评论