【发布时间】:2011-08-24 08:16:55
【问题描述】:
如何在 MsgBox 中显示图像?
【问题讨论】:
如何在 MsgBox 中显示图像?
【问题讨论】:
答案是:这是不可能的。 MsgBox 只能显示字符串。 (Documentation)
另一种方法是在 Internet Explorer 小窗口中显示您的图像。这是一个例子:
Set objExplorer = CreateObject("InternetExplorer.Application")
With objExplorer
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Left = 100
.Top = 100
.Width = 200
.Height = 200
.Visible = 1
.Document.Title = "Important image!"
.Document.Body.InnerHTML = _
"<img src='http://sstatic.net/stackoverflow/img/venn-diagram.png' height=100 width=100>"
End With
这应该会显示在 Stack Overflow 的 about 部分中找到的维恩图。
【讨论】:
您需要的是超文本应用程序或 HTA。您使用 HTML 创建表单。
【讨论】: