上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 44 下一页
摘要: 自定义控件的滚动条一直不愿意弄,今晚细看了UserControl的继承结构,感觉是利用ScrollableControl控件实现的,于想查了该基类的使用方法。MSDN中的说明我不得要领,还好在CodeProject找到了一个教程主题是:Creating a scrollable and zoomable image viewer in C# ,有4个部分组成Part 1: The image viewerPart 2: Auto scrollingPart 3: Panning and keyboard supportPart 4: Zooming, auto center, size to 阅读全文
posted @ 2012-10-21 23:12 生命体验之kevin-Y 阅读(4838) 评论(0) 推荐(1)
摘要: 昨天在查一个DataGridView当前焦点CheckBox不勾选问题,发现在修改DataGridView数据源的值很容易忽略的问题,或者叫DataGridView的bug绑定数据假定我们绑一个DataTable/// <summary>/// 当前数据。Form私有成员/// </summary>DataTable curTable;/// <summary>/// 启动/// </summary>/// <param name="sender"></param>/// <param name= 阅读全文
posted @ 2012-05-09 09:29 生命体验之kevin-Y 阅读(441) 评论(1) 推荐(0)
摘要: 1.自动拖放只支持DragDropEffects.Move近日需要程序在运行时将TreeView节点拖放到RichTextBox。发现RichTextBox没有DragOver等事件,但有EnableAutoDragDrop属性,于是设置为true。运行程序,可以从外部拖放一些文本、图片到RichTextBox,但是从TreeView拖放节点到RichTextBox时,老是显示类似禁止的那个小图标,无法拖放。难道RichTextBox对于内部拖放没有效果?以下是TreeView点击开始拖放的代码private void treeView1_MouseDown(object sender, Mo 阅读全文
posted @ 2012-05-07 12:11 生命体验之kevin-Y 阅读(2262) 评论(1) 推荐(1)
摘要: 功能:下载文件。方式:调用Remoting方法,得到整个文件的字节数组,写到本地文件。代码:public static bool DownloadFromTestPool(string pFileName, string pLocalFullPath){ bool isOk = true; System.IO.FileStream write = null; try { System.IO.FileInfo file = new FileInfo(pLocalFullPath); if (!file.Directory.Exists) ... 阅读全文
posted @ 2011-12-01 23:15 生命体验之kevin-Y 阅读(773) 评论(0) 推荐(0)
摘要: 找了一段生成ClickOne的快捷方式的生成代码,晚上回去试试能否可用。 阅读全文
posted @ 2011-09-08 10:23 生命体验之kevin-Y 阅读(350) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 44 下一页