首页 \ 问答 \ 使用Timer,通过标题栏上的“关闭”按钮关闭Delphi表格(Delphi Form closing by Close button on caption bar using Timer)

使用Timer,通过标题栏上的“关闭”按钮关闭Delphi表格(Delphi Form closing by Close button on caption bar using Timer)

我有一个带有一个FadeIn Timer和一个FadeOut Timer的项目。 我的表单由FadeIn Timer创建,由FadeOut Timer关闭。 最初启用FadeIn Timer并禁用FadeOut Timer。 淡入定时器代码:

if MainForm.AlphaBlendValue >= 235 then
  Timer01.Enabled := false 
else 
  MainForm.AlphaBlendValue := MainForm.AlphaBlendValue + 5;

FadeOut定时器代码:

if MainForm.AlphaBlendValue <= 0 then 
  Timer02.Enabled := false 
else 
  MainForm.AlphaBlendValue := MainForm.AlphaBlendValue - 5; 
close;

我的要求是,如果我点击标题栏的“X”按钮,FadeOut Timer将处于活动状态。 所以我定义了

if Msg.Result=htClose then 
  FadeOutTimer.Enabled:=true;

但它不起作用。 请帮我。


I have a project with one FadeIn Timer and One FadeOut Timer. My form is created by FadeIn Timer and is closed by FadeOut Timer. Initially FadeIn Timer is enabled and FadeOut Timer is disabled. FadeIn Timer Code :

if MainForm.AlphaBlendValue >= 235 then
  Timer01.Enabled := false 
else 
  MainForm.AlphaBlendValue := MainForm.AlphaBlendValue + 5;

FadeOut Timer Code :

if MainForm.AlphaBlendValue <= 0 then 
  Timer02.Enabled := false 
else 
  MainForm.AlphaBlendValue := MainForm.AlphaBlendValue - 5; 
close;

My requirement is that the FadeOut Timer will be active if I click on the "X" Button of the Caption Bar. So I defined

if Msg.Result=htClose then 
  FadeOutTimer.Enabled:=true;

But it not working. Please help me.


原文:https://stackoverflow.com/questions/11500636
更新时间:2023-08-15 14:08

最新回答

可以写shell脚本,用cygwin就可以
www.cygwin.com
大哥您这个问题,确实问得不着边际。首先unix和api就不能类比……

perl,其他的您别想,她就是一门语言。然后呢,因为很爽,所以现在主流的linux平台都提供perl,有一些开源程序(包括我知道有一个wow插件)是perl写的,有一些包是用perl去build的。可以不严格地说,perl是linux事实上的系统语言之一。纯种的unix我不熟,不清楚情况。

perl曾经是cgi事实上的指定语言,但因为perl的缺点——对于写cgi来说过于强大,杀鸡用牛刀——所以现在用perl写cgi的不多了,php、jsp比较多,要用cgi的话直接考虑c/c++的也不少。

perl还有一个重要用途,就是在生物信息学上。她有一个开源模块叫bioperl,这个倒是可以做个类比:bioperl在生物信息学的地位就像matlab在数学中的地位一样。

perl的模块非常神奇,经过长年发展,已经号称“几乎可以完成任何你想得到的功能”。你想做什么的话,直接上cpan搜模块就行了,这也是她能迅速成为一个实用工具的原因。

我很喜欢perl,因为这个语言很自由。用c写程序我会觉得我在工作,但用perl写程序我会觉得我在和电脑说话,这种感觉很舒服。但是,您不要迷信perl,因为纯perl效率绝对不高;你可以喜欢她,但她不是神,就这么个概念。也有很多人也鄙视perl,觉得这是个怪胎、邪教;但我就要说,我鄙视正统,我喜欢歪门邪道。

另外,关于perl的名字,不要理会什么实用抽取与报告。这就是lw为了凑pearl(珍珠)这个词深造的……

相关问答

更多
  • JAVA学习中好网站 - - http://www.54bk.com 我是博客 http://www.java-cn.com java中文网 http://java.sun.com sun官方网站 http://www.comejava.com 动网先锋 http://www.sawin.cn 小龙亭 http://www.java.com.cn java讨论区 http://www.cn-java.com 中文java技术网 http://www.chinajavaworld.com java开发者 ht ...
  • http://blog.sina.com.cn/lovelysina 这是我的博客,里面有电脑的四大系统,Windows ,Linux,银河麒麟,Mac,在一篇名 为“操作系统下载”的博文中,这些系统都是我测试过的,很好用,所以我收集了下来 ,给你吧。
  • jqueryAPI: http://www.pmal.net/jquery/ http://plugins.jquery.com/
  • JAVA学习中好网站 - - http://www.54bk.com 我是博客 http://www.java-cn.com java中文网 http://java.sun.com sun官方网站 http://www.comejava.com 动网先锋 http://www.sawin.cn 小龙亭 http://www.java.com.cn java讨论区 http://www.cn-java.com 中文java技术网 http://www.chinajavaworld.com j ...
  • 多上官网和mos,国内Oracle论坛ITPUB是比较好的,可以多去那里转转,很多大拿出没。
  • ORACLE数据库技术实用详解:教你如何成为10g ocp. 这本书非常不错,推荐你看一下
  • Linux本身只是个内核,发布在http://www.kernel.org,并没有官方网站这样的说法 现在用的Linux都是用Linux的内核加上GNU的软件做出来的,GNU的网站是http://www.gnu.org,好像有部分的中文页面,但是想看到整个的中文网站,大概不太行,而且这两个网站都没有什么必要弄中文网站,http://www.kernel.org就是发布Linux内核,http://www.gnu.org是宣传GNU和GPL的地方,还有发布GNU的软件的,所以也没太大的必要弄出中文的网站. L ...
  • 我收集的一些,有的是英文的…… http://knoppix.tnc.edu.tw/ 中文Live CD Linux www.linuxiso.org www.linux110.com 红联Linux门户 www.linux110.com/bbs 红联Linux论坛 www.linuxdiyf.com http://www.linux286.com/linux/linuxdzsj.htm Linux电子书 www.linuxforum.net 国内最高水平GNU站点 http://www.chinaunix ...
  • 1.Github是国际化的社区,全世界的人都用英文交流。   2.GitHub的团队非常小。大家没有提供本土化语言版本的意愿和动力。   3.国产(山寨)GitHub非常多。GitCafe,开源中国,CSDN都有。但是山寨的不如原版好用就是了,然而作为免费的开源仓库是足够了,作为社区就差点事。
  • 我在这里找到了关于CSS的中文字体系列定义的很好的指南: http : //www.kendraschaefer.com/2012/06/chinese-standard-web-fonts-the-ultimate-guide-to-css-font-family -declarations换网络的设计中,简化-中国/ 基本上,大多数网站只是声明一个英文字体,并让浏览器回退到缺省的中文字体,无论是serif(通常是'宋体'aka SimSun)还是sans-serif(通常是SimHei)。 I foun ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。