williambirkin

恭喜发财!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2007年5月10日

摘要: 1. Windows Forms中禁用窗体的关闭按钮 添加必要的命名空间: using System.Runtime.InteropServices; 添加必要的常数和API函数的引用 private const int SC_CLOSE = 0xF060; private const int MF_ENABLED = 0x00000000; private const int MF_GRAYED... 阅读全文
posted @ 2007-05-10 13:25 williambirkin 阅读(506) 评论(0) 推荐(0) 编辑

摘要: 回车移动焦点1.普通控件(TextBox)(最好在父窗体中实现以下代码,然后子窗体继承父窗体实现该功能)①Form.KeyPreview属性设为True②在KeyPress事件中添加以下代码private void BaseForm_KeyPress(object sender, KeyPressEventArgs e){ if (e.KeyChar == (char)Keys.Return... 阅读全文
posted @ 2007-05-10 12:16 williambirkin 阅读(1081) 评论(2) 推荐(0) 编辑