Winforms - 为什么“Show()"在系统托盘双击最终在我的应用程序中最小化后? [英] Winforms - why does a "Show()" after a system tray double click end up in my app minimized?

查看:42
本文介绍了Winforms - 为什么“Show()"在系统托盘双击最终在我的应用程序中最小化后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Winforms - 为什么系统托盘双击后的Show()"最终在我的应用中最小化?

Winforms - why does a "Show()" after a system tray double click end up in my app minimized?

我如何确保在通知图标双击事件中我隐藏的主窗体恢复正常可见,而不是最小化(也不是最大化)

How do I ensure Inthe notifyicon double click event that my hidden main form comes back visible as normal, not minimized (nor maximised for that matter too)

推荐答案

我猜您是将应用程序放在托盘中进行最小化操作.在这种情况下,Show 只会恢复可见性.

I would guess that you put your application in tray on minimize action. In that case, Show just restores visibility.

尝试在 Show() 之前添加 form.WindowState = Normal.

Try adding form.WindowState = Normal before Show().

这篇关于Winforms - 为什么“Show()"在系统托盘双击最终在我的应用程序中最小化后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆