随笔 - 92  文章 - 0  评论 - 13  阅读 - 17万
05 2010 档案
[C#]连接带有密码的ACCESS数据库时出现“无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开”的解决方法
摘要:连接带有密码的ACCESS数据库时出现“无法启动应用程序。工作组信息文件丢失,或是已被其它用户以独占方式打开”的解决方法:此问题是由数据库的连接串引起的,可用下面的串连接即可Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=true;Data Source=E:\data1.mdb;Jet OLEDB:Databa... 阅读全文
posted @ 2010-05-31 15:06 BoneKing 阅读(582) 评论(1) 推荐(0) 编辑
[C#]生成缩略图
摘要:/// <summary> /// 生成缩略图 /// </summary> /// <param name="sourceImagePath">原图片路径(绝对路径)</param> /// <param name="thumbnailImageWidth">缩略图的宽度(高度与按源图片比例自动生成)</param> pub... 阅读全文
posted @ 2010-05-10 09:36 BoneKing 阅读(205) 评论(0) 推荐(0) 编辑
[C#] 读写注册表
摘要:RegistryKey rkey = Registry.LocalMachine; //The second parameter tells it to open the key as writable RegistryKey rkey1 = rkey.OpenSubKey("Software",true); RegistryKey rkey2 = rkey1.... 阅读全文
posted @ 2010-05-10 09:35 BoneKing 阅读(154) 评论(0) 推荐(0) 编辑
[C#]在WinForm下使用HttpWebRequest上传文件并显示进度[转]
摘要:这段时间因项目需要,要实现WinForm下的文件上传,个人觉得采用FTP方法太麻烦,还得配置FTP服务器,要通过防火墙也是一个麻烦。本来打算采用WebClient方法,但是采用这个方法实现后,进度条很短时间后就达到最大值,要等待一段时间才能传送完毕,要是文件太大(我这里测试约100M),会出现错误。后来才知道,原来WebClient是在加载完整个文件到内存后才真正开始上传,怪不得会出现前面的问题了... 阅读全文
posted @ 2010-05-07 14:13 BoneKing 阅读(624) 评论(0) 推荐(0) 编辑
[C#] Image 转换成 Icon
摘要:/// <summary> /// Converts an image into an icon. /// </summary> /// <param name="img">The image that shall become an icon</param> /// <param name="size">The width and he... 阅读全文
posted @ 2010-05-06 10:35 BoneKing 阅读(1552) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示