System.Windows.MessageBox VS System.Windows.Forms.MessageBox [英] System.Windows.MessageBox vs System.Windows.Forms.MessageBox

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

问题描述

我无法找出关键的区别是两个消息框之间有什么。 System.Windows.MessageBox之间的区别是什么 System.Windows.Forms.MessageBox

I am having trouble finding out what the key differences are between the two message boxes. What is the difference between System.Windows.MessageBox and System.Windows.Forms.MessageBox?

推荐答案

System.Windows.MessageBox 加入与WPF和WPF组件中存在(presentationFramework.dll)。

System.Windows.MessageBox was added with WPF, and exists within the WPF assemblies (PresentationFramework.dll).

System.Windows.Forms.MessageBox 添加Windows窗体,并在Windows窗体组件存在。

System.Windows.Forms.MessageBox was added with Windows Forms, and exists within the Windows Forms assemblies.

如果你的程序是一个Windows窗体程序,我会用后者( System.Windows.Forms.MessageBox ),因为它不会在依赖拉WPF。在另一方面,如果你正在为WPF,我会使用 System.Windows.MessageBox

If your program is a Windows Forms program, I would use the latter (System.Windows.Forms.MessageBox), as it won't pull in a dependency on WPF. On the other hand, if you are developing for WPF, I'd use System.Windows.MessageBox.

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

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