会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Make life better.
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2011年4月7日
委托/事件的重写
摘要: public new event ProgressChangedEventHandler ProgressChanged { add { base.ProgressChanged += value; } remove { base.ProgressChanged -= value; } }
阅读全文
posted @ 2011-04-07 09:22 sweetjian
阅读(204)
评论(0)
推荐(0)
2011年3月20日
Winform 打包,卸载程序制作--获取ProductCode
摘要: Winform 打包,卸载程序制作--获取ProductCode
阅读全文
posted @ 2011-03-20 22:27 sweetjian
阅读(1290)
评论(0)
推荐(0)
2011年2月15日
MemoEdit自动滚动到结尾
摘要: TextBox控件可以用 TextBox.AppentText()Memoedit则:Memoedit.SelectionStart=MemoEdit.Text.length;MemoEdit.ScrollToCaret();
阅读全文
posted @ 2011-02-15 17:00 sweetjian
阅读(2388)
评论(0)
推荐(0)
命令行卸载程序
摘要: C:\Documents and Settings\Administrator>msiexec.exe /x {F75CD347-F31B-470C-BE6F-3987E9B6AA8F}其中最后面一串为ProductCode
阅读全文
posted @ 2011-02-15 15:21 sweetjian
阅读(1104)
评论(0)
推荐(0)
2011年1月29日
Control.Invoke注意事项
摘要: if (textBoxMsg.IsHandleCreated) textBoxMsg.BeginInvoke((ThreadStart)delegate { textBoxMsg.AppendText("msg"); });调用Invoke或BeginInvoke之前注意检查IsHandleCreated属性,否则如果在窗体初始化之前或窗体关闭之后调用Invoke或BeginInvoke将会出错Invoke会阻塞调用线程进入UI线程BeginInvoke则不会BeginInvoke的原理是将调用的方法Marshal成消息,然后调用Win32 API中的RegisterWindowMessage
阅读全文
posted @ 2011-01-29 14:21 sweetjian
阅读(387)
评论(0)
推荐(0)
2011年1月25日
反序列化无法找到程序集
摘要: 提示找不到程序集. 原因是序列化时把序列化类的命名空间等信息保存了,但应用程序和类库的命名空间可能是不一样的,所以提示找不到程序集. 解决方法如下: 方法1.将dll加入强名称,注册到全局程序集缓存中 方法2.在反序列化使用的IFormatter 对象加入Binder 属性,使其获取要反序列化的对象所在的程序集 示例如下:public void DeSerialize( byte [] data, int offset) { IFormatter formatter = new BinaryFormatter(); formatter.Binder = new UBinder(); Memor
阅读全文
posted @ 2011-01-25 14:23 sweetjian
阅读(4528)
评论(0)
推荐(1)
2011年1月6日
获取执行程序的路径
摘要: Winform下:Application.ExecutablePath;其他: Application.StartupPath; Assembly.GetEntryAssembly();
阅读全文
posted @ 2011-01-06 14:39 sweetjian
阅读(178)
评论(0)
推荐(0)
2010年12月31日
读取局域网内的共享文件
摘要: 不能用 new FileStream("xx",FileMode.Read);//权限不足无法读取要用 File.OpenRead("xx");
阅读全文
posted @ 2010-12-31 14:29 sweetjian
阅读(459)
评论(0)
推荐(0)
操作config文件
摘要: Configuration objConfig = ConfigurationManager.OpenExeConfiguration(System.Windows.Forms.Application.StartupPath + @"\TestConfig.exe");//需要有TestConfig.exe文件 ConnectionStringsSection objAppsettings = null; objAppsettings = (ConnectionStringsSection)objConfig.GetSection("connectionStrings"); foreach (
阅读全文
posted @ 2010-12-31 09:44 sweetjian
阅读(255)
评论(0)
推荐(0)
2010年12月23日
TextEdit验证
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Drawing; 5 using System.Data; 6 using System....
阅读全文
posted @ 2010-12-23 22:18 sweetjian
阅读(3117)
评论(0)
推荐(1)
上一页
1
2
3
4
5
6
7
下一页
公告