如何在无边界的winforms中保持最小化效果 [英] how to retain minimize effect in borderless winforms
问题描述
如果有一个标题栏和winform的边框,那么最小化效果i,e。窗口将最小化到任务栏的动画将播放/发生。但是当我删除winform的边框并尝试将其最小化时,动画将无法播放。所以朋友们如何保留这个动画效果。?
When there is a title bar and border to winform then minimize effect i,e. animation in which window will minimize to task bar slowly will play/occur. but when i remove the border of winform and try to minimize it the animation will not play. So friends how to retain this animation effect.?
推荐答案
关于某个按钮的点击或按键/按键组合的新闻事件
in c#
on some button's click or key/key combination's press events
in c#
this.WindowState = FormWindowState.Minimized;
in vb
in vb
Me.WindowState = FormWindowState.Minimized
Happy Coding!
:)
Happy Coding!
:)
我想我知道你需要什么。
这是你的情况:
1.无边框窗体
2.最小化按钮
要最小化,只需在按钮的点击事件中添加以下代码。
I think I know what you need.
This is your situation:
1. Border-less Windows Form
2. Minimize Button
To minimize you simply add the following code on the button's click event.
this.WindowState = FormWindowState.Minimized;
但是,当表单被最小化时,这不会给你精灵效果。
为了获得这种效果,在WPF中,检查 此 链接。
对于WinForms,我找不到解决方案。
But, this will not give you the "Genie Effect" when the form is been minimized.
To gain that effect, in WPF, check the this link.
For WinForms, I couldn't find a solution yet.
这篇关于如何在无边界的winforms中保持最小化效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!