简体   繁体   English

如何在 C# WinForms 中执行类似 explorer.exe 的弹出窗口?

[英]How can I do a pop-up like explorer.exe in C# WinForms?

When we got an error message box in explorer.exe, this pop-up doesn't create another tab in status bar.当我们在 explorer.exe 中收到错误消息框时,此弹出窗口不会在状态栏中创建另一个选项卡。 But when I tried like:但是当我尝试像:

MessageBox.Show("Error!");

in Windows Forms, this MessageBox is a separate tab.在 Windows 窗体中,此 MessageBox 是一个单独的选项卡。 How can I perform all tabs in a single button?如何在一个按钮中执行所有选项卡? Thank you.谢谢你。

I don't think it is possible without some pinvoke win32 libraries.我认为没有一些 pinvoke win32 库是不可能的。

You could create your own form and set the ShowInTaskbar property to false.您可以创建自己的表单并将ShowInTaskbar属性设置为 false。 Use the ShowDialog() instead of Show() , this will make your form modal.使用ShowDialog()而不是Show() ,这将使您的表单模态化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM