不专注于MessageBoxButton的MessageBox [英] MessageBox without focus on a MessageBoxButton

查看:38
本文介绍了不专注于MessageBoxButton的MessageBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以显示C#中的MessageBox而不关注消息框中的按钮?例如,以下代码片段(无法正常运行):

Is there a way to show an MessageBox in C# without a focus on a button in the message box? For example the following code snippet (which is not working as wished):

 MessageBox.Show("I should not have a button on focus",
                        "Test",
                        MessageBoxButtons.YesNo,
                        MessageBoxIcon.Question,
                        MessageBoxDefaultButton.Button3);

我想要的是显示MessageBox而不关注[Yes]或[No].背景是客户扫描了在和处有回车符的多个条形码.因此,当消息框弹出时,他们在不注意消息框的情况下扫描了更多的条形码,因此按下"了一个按钮.

What i want is that the MessageBox is shown without a focus on [Yes] or [No]. Background is that the customer scans several barcodes which have an carriage return at the and. So when the messagebox pops up and they scan further barcodes without noticing the message box they "press" a button.

推荐答案

使用标准MessageBox是不可能的-如果需要此功能,则需要实现自己的实现.

This isn't possible with the standard MessageBox - you'll need to implement your own if you want this functionality.

请参见此处以开始使用.

这篇关于不专注于MessageBoxButton的MessageBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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