Devexpress 中控件及GridView控件的Cell增加右键复制功能
摘要:a) GridView中任何一个Cell增加右键复制功能GridHitInfo gridHitInfo = new GridHitInfo(); //用户接收GridView中单元格数据void gridView_MouseDown(object sender, MouseEventArgs e){...
阅读全文
posted @
2015-08-07 16:38
fery
阅读(1837)
推荐(0)
WinForm 实现主程序(exe)与其关联类库(*.dll)分开存放
摘要:WinForm 实现主程序(exe)与其关联类库(*.dll)分开存放开发环境:Microsoft Windows 7 SP1Microsoft.NET Framework 4.0 (x64)1. 首先,App.config:2. 其次, 重新生成->然后在eXe同一目录下创建文件夹(lib: 必须...
阅读全文
posted @
2014-05-02 13:15
fery
阅读(671)
推荐(0)
Winform窗体对键盘的响应处理
摘要:Winform组合键响应处理://Support Shortcut Key private void MainForm_KeyUp(object sender, KeyEventArgs e) { if ((e.Modifiers & Keys.Control) != 0 && e.KeyCode == Keys.G) { FrmGoto frmGoto = new FrmGoto(); frmGoto.StartPosition = FormStartPosition.CenterScreen; frmGoto.Show(); } } 设置Form 窗体中默认的回车及
阅读全文
C#读取“我的文档”等特殊系统路径及环境变量
摘要:参考一:C# 如何获取某用户的“我的文档”的目录Console.WriteLine(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));System.Environment.GetFolderPath 方法获取指向由指定枚举标识的系统特殊文件夹的路径。public static string GetFolderPath( Environment.SpecialFolder folder)Environment.SpecialFolder 枚举说明: 成员名称 说明 ApplicationData 目.
阅读全文
posted @
2013-01-06 08:48
fery
阅读(515)
推荐(0)
C# 获取当前路径方法
摘要://获取包含清单的已加载文件的路径或 UNC 位置。 public static string sApplicationPath = Assembly.GetExecutingAssembly ( ).Location; //result: X:\xxx\xxx\xxx.dll (.dll文件所在的目录+.dll文件名) //获取当前进程的完整路径,包含文件名(进程名)。 string str = this.GetType ( ).Assembly.Location; //result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名) //获取新的 Proc.
阅读全文
posted @
2013-01-06 08:45
fery
阅读(156)
推荐(0)
扩展:向DataGridView 增加日历列及日历单元格
摘要:using System;using System.Windows.Forms;namespace subform_TFS.Control{ /// <summary> /// Calendar column in DataGridView /// </summary> /// <example > /// DataGridViewCalendarColumn col = new DataGridViewCalendarColumn(); /// col.DataPropertyName = "CreateDate"; /// col.H
阅读全文
winform窗体弹出位置研究
摘要:对于winform窗体显示在父窗体中,有两种情况,第一是模式显示,既showDialog().这种显示只需要设置StartPosition=CenterPostion.用代码如下:From f2=new Form();f2.StartPosition = FormStartPosition.CenterParent;f2.ShowDialog()第二种是非模式显示:这样只能用手动去控制他的位置了。...
阅读全文
posted @
2010-10-31 21:55
fery
阅读(354)
推荐(0)