MsgBox 和 MessageBox.Show 之间有区别吗? [英] Is there a difference between MsgBox and MessageBox.Show?

查看:40
本文介绍了MsgBox 和 MessageBox.Show 之间有区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下两者有区别吗?

 msgbox()
 messagebox.show()

有些教程使用msgbox(),有些使用另一个,messagebox.show()---我看到两者都可以有一个可编辑的样式,但我想知道:为什么有两个?

Some tutorials use msgbox(), and some use the other, messagebox.show()---I see that both can have an editable style, but I was wondering: Why are there two?

是否适合年长的程序员(他们学习了旧版本的 Visual Basic)?

Is it to accommodate older programmers (who have learnt on an older version of Visual Basic)?

那么在这种情况下,我应该在 Visual Basic 2010 中使用哪个 (Visual Studio 2010)?

So in that case, which one should I use in Visual Basic 2010 (Visual Studio 2010)?

推荐答案

MsgBox()Messagebox.Show() 相同.

它是为习惯它的 VB6 程序员而存在的.

It exists for VB6 programmers who are used to it.

没有关于使用哪一个的规则,但由于 MsgBox 最终只是委托给 MessageBox,我个人会直接使用 MessageBox>.

There are no rules on which one to use, but since MsgBox simply ends up delegating to MessageBox, I personally would go directly with MessageBox.

这篇关于MsgBox 和 MessageBox.Show 之间有区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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