摘要: 1、不安全的方法: 将 Control.CheckForIllegalCrossThreadCalls 设置为false (.net1.0中没有)2、安全的方法: 异步委托(不要将除了控件访问外其他逻辑代码放到委托的回调方法中) private void button1_Click(object sender, System.EventArgs e){ //实例化一个线程,并引用线程开始执行... 阅读全文
posted @ 2008-12-17 15:25 cindymeng 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 1、使用FileStream读写文件 文件头: using System; using System.Collections.Generic; using System.Text; using System.IO; 读文件核心代码: byte[] byData = new byte[100]; char[] charData = new char[1000]; try... 阅读全文
posted @ 2008-12-17 14:54 cindymeng 阅读(492) 评论(0) 推荐(0) 编辑
摘要: Xtreme SkinFramework™ 为 Windows 开发者提供高度完善的应用程序皮肤框架技术,它的开发采用了 Windows Themes (Visual Styles) 的思想。 想要得到一个具有完全主题效果的程序,只需要几行代码即可。Xtreme SkinFramework 提供与 Windows XP 和更高层次的 Visual Styles 最大的兼容性,Visual Styl... 阅读全文
posted @ 2008-12-17 14:47 cindymeng 阅读(1033) 评论(0) 推荐(0) 编辑
摘要: 1、定义接口及实现 using System; using System.Runtime.InteropServices; namespace MYLib { //建立接口 [Guid("61BB24CB-4C2C-40f8-9E13-1AC5E558D56A")] public interface IMyInterface { void... 阅读全文
posted @ 2008-12-17 11:44 cindymeng 阅读(1631) 评论(0) 推荐(0) 编辑