摘要: this.richTextBox1.VScroll += new System.EventHandler(this.richTextBox1_VScroll);this.richTextBox2.VScroll += new System.EventHandler(this.richTextBox1_VScroll);[DllImport("user32.dll")]static extern i... 阅读全文
posted @ 2011-03-24 01:05 Mike Dos Zhang 阅读(823) 评论(1) 推荐(1) 编辑
摘要: 1. Create a Windows Form project from vs2010.2. Add a class named “Student” with two public properties, Name(string) and Id(int).3. Build project.4. Add a DataSource to this project, you can use the option from Toolbar or just right click on this project and select add a item option.5. Select “Objec 阅读全文
posted @ 2011-03-16 19:13 Mike Dos Zhang 阅读(1629) 评论(0) 推荐(2) 编辑
摘要: 这两个方法是我今天在给一个客户做解决方案的时候想出来的,由于时间仓促,也没有进行细化,也就大概实现了一部分功能,有兴趣的朋友,可以完善下这两个方法,当然也希望在你完善之后也在此共享一下你的代码,使其能够帮助更多的人。刚开始使用的代码编辑器不好看,结果想换一个,看到已经有这么多人浏览了,就没删除这篇文章重新上传,只是在live wirter上编辑好直接复制过来,但是没想到这个代码编辑器复制过来的没有了折叠功能,大家见谅。private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEve 阅读全文
posted @ 2011-03-09 23:06 Mike Dos Zhang 阅读(1792) 评论(3) 推荐(2) 编辑
摘要: 写这篇文章是为了让大家弄明白MSDN文档中的一个比较让人难懂的词句。 不知道大家在平时翻看MSDN文档的TextBox.Multiline属性的时候是否注意到下面这段话: http://msdn.microsoft.com/en-us/library/12w624ff.aspx When the font is changed, any indentation that you have defined does not appear. To get indentation, set Multiline to true and override WM_SETFONT without calli 阅读全文
posted @ 2011-03-07 20:31 Mike Dos Zhang 阅读(371) 评论(1) 推荐(1) 编辑
摘要: 我在国语的网页上很少发现有人遇到过这种问题,在一些英文网页中见到的也比较少,而且至今也没有找到答案,或者是哪一个比较权威的说辞。据一些英文网页显示,这个问题已经存在很多年了,而不只是在windows7上面(我是在用windows7的时候才遇到的这个问题)。刚开始时玩EA游戏的时候,明明是进程管理器中已经存在了游戏的进程实例,但就是没有游戏窗口出现。后来发现原来是杀毒软件的缘故,把杀毒软件暂时关闭或者调成游戏模式(bitdefender2011),这样EA游戏就可以正常运行了。然后接着就是windows media player12 和Zune,在关闭之后,进程管理器上面还能看到这个进程实例,而 阅读全文
posted @ 2011-03-06 21:24 Mike Dos Zhang 阅读(1481) 评论(0) 推荐(1) 编辑
摘要: Hi all,I have a idea, the solution in my before post only can get the current process's environment, so why don't we use injection, to inject the code into the desert process, then my code can retrieve out all the environments by GetEnvironmentStrings and use SendMessage function send the en 阅读全文
posted @ 2011-02-26 03:58 Mike Dos Zhang 阅读(1255) 评论(0) 推荐(3) 编辑
摘要: 此idea是由我处理一个帖子的时候突然蹦出来的,感觉可能有的朋友需要,就将我的回复帖在我的blog,由于时间问题,我没有写中文版的,而是直接用的英文,希望大家见谅,不过代码会告诉大家我的思路,其实也没多少可以解释的,我认为这只是一个小技巧罢了。I use the Implicit Conversion Operator to help us do the similar things as we inherit from the Boolean type, but MyBool type is not a Boolean type.And then we can override some m 阅读全文
posted @ 2011-01-23 22:53 Mike Dos Zhang 阅读(1165) 评论(0) 推荐(1) 编辑
摘要: 2010 对一站式示例代码库,对奋战在一站式示例代码库上的每一位工程师来说都是不同寻常的一年。 在我们共同努力和开发社区的支持下,该项目从一年前的草根雏形,成长为CodePlex排名前三,含有500多代码示例的“微软示例代码库”。 在此辞旧迎新之际,项目组感谢开源社区及开发者社区伴随我们一路走过来。2011年,我们会做得更好,以回馈社区,回馈广大开发者。回顾20101) 215 新示例,300K 下载量,CodePlex 前三2010 年,我们总共发布了215个新示例,总代码示例数过500。可以在http://1code.codeplex.com/ 下载到,或通过浏览示例代码索引下载单个示例包 阅读全文
posted @ 2011-01-04 13:06 Mike Dos Zhang 阅读(2539) 评论(11) 推荐(7) 编辑
摘要: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/754566f7-f810-4550-8e88-651baac391caPS:我的同事开发了一个MSDN论坛的小工具,有兴趣的朋友可以试试,此工具已开始在国内推行: 阅读全文
posted @ 2010-11-30 16:58 Mike Dos Zhang 阅读(199) 评论(0) 推荐(1) 编辑
摘要: In VB.NET project, the manifest will added automatically, you can use this way to open and edit it:Build this project, and then run it through double click on the application file in the output directory.PS:我的同事开发了一个MSDN论坛的小工具,有兴趣的朋友可以试试,此工具已开始在国内推行: 阅读全文
posted @ 2010-11-23 20:12 Mike Dos Zhang 阅读(2214) 评论(0) 推荐(1) 编辑