Delphi:类似 FireFox 中的 AnimateWindow
我有一个面板(底部对齐)和一些控件(客户端对齐)。
为了对面板进行动画处理,我使用:
AnimateWindow(Panel.Handle, 1000, aw_hide or AW_SLIDE OR AW_VER_POSITIVE);
panel.Visible:=false;
在我的情况下,面板会平滑地隐藏,然后其他控件才会占用它的空间。
但我希望其他控件能够在面板向下时平稳且同步地移动。
例如,FireFox就使用这种效果。
有人能给我推荐一些有用的东西吗?谢谢!
I have a panel (bottom aligned) and some controls (client aligned).
To animate the panel I use:
AnimateWindow(Panel.Handle, 1000, aw_hide or AW_SLIDE OR AW_VER_POSITIVE);
panel.Visible:=false;
In my case the panel smoothly hides and only then other controls take it's space.
But I want that other controls move smoothly and simultaneously with the panel down.
For example, FireFox uses this effect.
Can anybody suggest me something useful? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AnimateWindow
是一个同步函数,动画完成后才会返回。这意味着在 dwTime 参数中指定的时间内,不会运行任何对齐代码,并且您的“alClient”对齐控件将保持静止,直到动画完成。我建议改用计时器。举个例子:
AnimateWindow
is a synchronous function, it will not return until the animation finishes. That means during the time specified indwTime
parameter, no alignment code will run and your 'alClient' aligned controls will stay still until the animation finishes.I'd suggest to use a timer instead. Just an example:
删除第二行
,只保留
Delete the second line
and leave only