FormShortCut MainForm 和 二级FORM
发现,主FORM 定义的快捷键,在二级FORM里也有效。
反过来,就无效。
这样的话,就要考虑 快捷键的冲突问题 了,本来以为不同的FORM 是独立的。
http://codeverge.com/embarcadero.delphi.vcl.using/shortcuts-of-the-main-form-acces/1076501
John Schmidt wrote: > Hi,
>
> I experience problems when using keys in nonmodal shown SDI forms of
> the application if they are used as shortcuts in the main form. Iif
> the sub-form is shown modal than all works fine. How can I work
> around this 'feature'? - It's URGENT! - Thanks! The behaviour is actually intentional, it is for the support of typical
SDI apps where only the main form has a menu that is "shared" by the
child forms (an app like the IDE itself). Quite a bit of the VCL
behaviour is dictated by the requirements of the IDE... To fix this problem you have to override the main form's IsShortcut
method, like this: public
function IsShortCut(var Message: TWMKey): Boolean; override; function TMainform.IsShortcut( Var Message: TWMKey ): Boolean;
begin
if Screen.Activeform <> self then
Result := false
else
Result := inherited IsShortcut(Message);
end; This way the main form will only process shortcuts when it itself is
the active form. --
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
FormShortCut MainForm 和 二级FORM的更多相关文章
- 为WLW开发Latex公式插件
WLW是写博客的利器,支持离线.格式排版等,而且拥有众多的插件.博客园推荐了代码插入插件,但是没有提供WLW的公式编译插件.目前我的一般做法是:先在Word下使用MathType编辑好公式,然后将公式 ...
- Javascript中,document.getElementsByName获取的就一定是数组了么?
今天在一张JSP网页中,写一个javascript方法,用于全选. 全部被选checkBox位于一个名为mainForm的Form下,name=pushIds.方法如下: function selec ...
- 单实例运行tz
(引用了 Microsoft.VisualBasic.ApplicationServices)SingleInstanceApplicationWrapper.cs using System.W ...
- 单实例 winform zz
(引用了 Microsoft.VisualBasic.ApplicationServices)SingleInstanceApplicationWrapper.cs using System.Wind ...
- Delphi 颜色转换
http://files.cnblogs.com/xe2011/StringToColor.rar unit Unit1; interface uses Windows, Messages, SysU ...
- C# 使用摄像头拍照 支持Win7 64位
原文:C# 使用摄像头拍照 支持Win7 64位 So, how do we capture an image from a WebCam? Once you download the source ...
- Windows Live Writer介绍及相关问题解决
今天本来想说更新一篇我的文章,更新的过程中添加了很多的内容,里面的图片太多了,导致我浏览器占用的内存不断增大,浏览器变得很卡,最后过了好久我终于更新完文章打算保存的时候居然卡住,然后所有我更新的文字和 ...
- c#设计应用程序单实例运行
利用WindowsFormsApplicationBase的IsSingleInstance来控制应用程序只能单实例运行. [DllImport("user32.dll", Ent ...
- sSkinProvider.pas
unit sSkinProvider;{$I sDefs.inc}{.$DEFINE LOGGED} interface uses Windows, Messages, SysUtils, Class ...
随机推荐
- Python3基础 list sort 从小(大)到大(小)排序
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- ACM-ICPC 2018 沈阳赛区网络预赛 Made In Heaven(K短路)题解
思路:K短路裸题 代码: #include<queue> #include<cstring> #include<set> #include<map> # ...
- 第九章 对称加密算法--IDEA
注意:本节内容主要参考自<Java加密与解密的艺术(第2版)>第7章“初等加密算法--对称加密算法” 9.1.IDEA 特点: 先于AES出来取代DES 安全性极高 常用于电子邮件加密算法 ...
- extgcd 扩展欧几里得算法模板
#include <bits/stdc++.h> using namespace std; int extgcd (int a,int b,int &x,int &y){ ...
- sql server 存储过程 procedure
https://www.cnblogs.com/selene/p/4483612.html
- hbase读写流程分析
前言 最近被大佬问到一个问题,hbase查询数据在最坏的场景下需要进行几次rpc,当时就懵了..下面主要对client端代码进行分析.阅读文章和看源码更配~ 读数据 流程总览 1. 从zookeepe ...
- 自动化测试框架Cucumber和RobotFramework的实战对比
转自: http://www.infoq.com/cn/articles/cucumber-robotframework-comparison 一.摘要 自动化测试可以快速自动完成大量测试用例,节 ...
- 【旧版本】Ubuntu 14.04 下 P416编译器 p4c的安装
注:此为2017年5月份的安装方法,最新的p4c安装方法见: Ubuntu14.04下 安装p4c 参考: p4c README Ubuntu 14.04 下 P4v16编译器 p4c的安装 系统要求 ...
- 【转载】可被路由的协议 & 路由协议 & 不可被路由的协议 的区别
原文地址:可被路由的协议 & 路由协议 & 不可被路由的协议 的区别 术语routed protocol(可被路由的协议)和routing protocol(路由协议)经常被混淆.可被 ...
- 使用rz,sz需要安装lrzsz
... tar zxvf lrzsz-1.12.20.tar.gz 4.进入目录 cd lrzsz-1.12.20 5../configure --prefix=/usr/local/lrzsz 6. ...