Microsoft.VisualBasic.Interaction.MsgBox 方法的问题 [英] Issue with Microsoft.VisualBasic.Interaction.MsgBox method

查看:29
本文介绍了Microsoft.VisualBasic.Interaction.MsgBox 方法的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

'Microsoft.VisualBasic.Interaction.MsgBox' 方法总是在显示任何消息时打开 Windows 任务栏.如何解决这个问题?我希望消息位于最顶部,但 Windows 任务栏不应该可见.

'Microsoft.VisualBasic.Interaction.MsgBox' method always brings up windows taskbar when any message is displayed. How to fix this issue? I want the message to be the top most but windows taskbar shouldn't be visible.

感谢您的帮助!!

推荐答案

是否有使用 Microsoft.VisualBasic.Interaction.MsgBox 的原因?我会尽可能避免使用 Microsoft.VisualBasic 库.它主要是为了向后兼容.Microsoft.VisualBasic 中的几乎所有内容都已在其他地方的 .Net Framework 中替换.

Is there a reason why you are using Microsoft.VisualBasic.Interaction.MsgBox? I would avoid using the Microsoft.VisualBasic library as much as possible. It's mainly there for backward compatibility. Almost everything in Microsoft.VisualBasic has been replaced in the .Net Framework elsewhere.

例如 MessageBox 现在在 System.Windows.Forms 中.

For example the MessageBox is now in System.Windows.Forms.

要始终强制将其置于顶部..... 尝试 MessageBoxOptions of DefaultDesktopOnly

To force it on top always..... try the MessageBoxOptions of DefaultDesktopOnly

或这个小代码项目示例.

要从 windows 任务栏中隐藏消息框,您可能需要在调用 显示(所有者参数).如果消息框没有所有者,它将作为自己的表单显示在任务栏上.

To hide the message box from the windows task bar you might need to pass in the form you are calling the message box from in the call to Show (owner parameter). If the message box doesn't have an owner it will display on the task bar as it's own form.

这篇关于Microsoft.VisualBasic.Interaction.MsgBox 方法的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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