开发者

Issue with Microsoft.VisualBasic.Interaction.MsgBox method

'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.

Appreciat开发者_运维技巧e your help!!


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.

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

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

or this little code project sample.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜