如何知道窗口是否被击活

xiaohuilau 2003-04-19 02:36:17
如何知道我的窗口是否被击活?就好像WINAMP 一样,如果程序被击活,用高亮的标题,否则用灰色的标题
...全文
49 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaohuilau 2003-04-27
  • 打赏
  • 举报
回复
那如果我的程序(窗口)里有10个控钮,当这10个按钮得到焦点时CAPTION为"ON",当失去焦点(包括焦点到了另一个程序或别的控件),此按钮的CAPTION为"OFF",应如何编写此程序?
jacky_shen 2003-04-26
  • 打赏
  • 举报
回复
TApplicationEvents
使用这个控件.

在Additionial面板上.
他有OnActivate和OnDeactivate两个事件,可以供你使用。
yansea 2003-04-19
  • 打赏
  • 举报
回复
帮助上的

property Active: Boolean;

Description

Use Active to determine whether the form has focus. The Active Form receives all keyboard input. If it has a title bar, it is drawn using the active colors specified in the Control panel.

If Active is True , the form has focus; if Active is False, the form does not have focus.

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧