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 ...
随机推荐
- Django框架(四) Django之视图层
视图函数 一个视图函数,简称视图,是一个简单的Python 函数,它接受Web请求并且返回Web响应.响应可以是一张网页的HTML内容,一个重定向,一个404错误,一个XML文档,或者一张图片. . ...
- Go第十篇之反射
反射是指在程序运行期对程序本身进行访问和修改的能力.程序在编译时,变量被转换为内存地址,变量名不会被编译器写入到可执行部分.在运行程序时,程序无法获取自身的信息. 支持反射的语言可以在程序编译期将变量 ...
- Linux系统编程之--守护进程的创建和详解【转】
本文转载自:http://www.cnblogs.com/mickole/p/3188321.html 一,守护进程概述 Linux Daemon(守护进程)是运行在后台的一种特殊进程.它独立于控制终 ...
- 明码|2018年蓝桥杯B组题解析第二题-fishers
标题:明码 汉字的字形存在于字库中,即便在今天,16点阵的字库也仍然使用广泛. 16点阵的字库把每个汉字看成是16x16个像素信息.并把这些信息记录在字节中. 一个字节可以存储8位信息,用32个字节就 ...
- 【附6】hystrix metrics and monitor
一.基本方式 hystrix为每一个commandKey提供了计数器 二.实现流程 https://raw.githubusercontent.com/wiki/Netflix/Hystrix/ima ...
- spring boot 多数据源 + 事务控制
1,首先在启动类加上@EnableTransactionManagement注解 package cn.bforce.common; import org.springframework.boot.S ...
- v-bind绑定属性样式
一.class的四种绑定方式 1.布尔值的绑定方式 <div id="demo"> <span v-bind:class="{'class-a':isA ...
- [不屈的复习] - http://how2j.cn/
http://how2j.cn/ 该教程网站分得比较规整!
- CenterOS下从零起步简单部署RockMongo
使用Mongodb,对于调试Query,查看Collection等状态,有Rockmongo是非常方便的. 研究了下Rockmongo的部署,主要是依赖PHP环境的web服务器,当前有两种服务器,一种 ...
- mysql中时间计算函数SQL DATE_SUB()用法
本文为博主原创,未经允许不得转载: 在写sql的时候,经常要在sql中传值时间,对时间进行计算并过滤.之前都是将时间在后台计算好,直接传值给sql, 今天发现,有一个更方便的sql函数,可以简化很多代 ...