2011年5月13日

摘要: //如果函数执行成功,返回值不为0。 //如果函数执行失败,返回值为0。要得到扩展错误信息,调用GetLastError。 [DllImport("user32.dll", SetLastError = true)] public static extern bool RegisterHotKey( IntPtr hWnd, //要定义热键的窗口的句柄 int id, //定义热键ID(不能与其它ID重复) KeyModifiers fsModifiers, //标识热键是否在按Alt、Ctrl、Shift、Windows等键时才会生效 Keys vk //定义热键的内容 阅读全文
posted @ 2011-05-13 16:57 N_unknown 阅读(362) 评论(0) 推荐(0) 编辑
摘要: //放入aspx页面中查看效果foreach (var item in typeof(System.Drawing.Color).GetMembers()) { try { if (item.MemberType == System.Reflection.MemberTypes.Property) { Panel p = new Panel(); p.Width = 300; p.Height = 60; p.GroupingText = item.Name; p.BackColor = System.Drawing.Color.FromName(item.Name); this.Contro 阅读全文
posted @ 2011-05-13 14:19 N_unknown 阅读(257) 评论(0) 推荐(0) 编辑

导航