本文介绍了Flash窗框的周围方式与SDI模态形式相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Windows函数FlashWindow和FlashWindowEx,但是它们会闪烁窗口标题和任务栏上的按钮.

i know Windows function FlashWindow and FlashWindowEx but they flash window title and button on the taskbar.

但是,当我们单击模态窗口后面的非活动窗口时,如何以相同的方式对Flash窗口进行编程?您知道主窗口+显示了模态形式,然后单击不活动的主窗口,然后模态形式在窗口周围闪烁了整个框架.

But how to programaticali flash window in the same way as is when we click on inactive window behind modal window? You know main window + you show some modal form and then you click on inactive main window then your modal form flash whole frame around the window.

更新我需要标准方式.我知道我可以使用桌面窗口管理器(DWM)API和并条机.但是我尝试避免此步骤,因为它需要将来进行维护.而且,我不想花时间分析如何自动完成相同"绘制方式.

UPDATEI need standard way. I know that i can use Desktop Window Manager (DWM) APIs and draw frame self. But i try avoid this step as it need future maintenance.And i do not want to spend time on analysing how to drawing this in "same" way as it is done automatically.

推荐答案

我看到它可以通过FlashWindowEx实现:)

I see that it can be accomplished by FlashWindowEx :)

我只是在此函数中省略了dwTimeout参数,但我误解了名称" FLASHW_CAPTION "不仅表示标题,还表示框架窗口.可以通过以下代码解决效果:

I simply omitted dwTimeout parameter in this function and i misunderstood the name"FLASHW_CAPTION" it mean not only Title but also window frame.The effect can be solved by this code:

Var f: TFlashWInfo;
begin
  f.cbSize:= SizeOf(TFlashWInfo);
  f.hwnd:= Handle;
  f.dwFlags:= FLASHW_CAPTION;
  f.uCount:= 8;
  f.dwTimeout:= 60;
  FlashWindowEx(f)

闪烁8次(这实际上意味着8次转换而不是次)仅以FLASHW_CAPTION以60毫秒的速率闪烁.

flash 8 times (this really mean 8 transit not times)flash only with FLASHW_CAPTION in rate 60 milliseconds.

这篇关于Flash窗框的周围方式与SDI模态形式相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 15:33