【问题标题】:Displaying an image in a VBScript MsgBox在 VBScript MsgBox 中显示图像
【发布时间】:2011-08-24 08:16:55
【问题描述】:

如何在 MsgBox 中显示图像?

【问题讨论】:

    标签: image vbscript msgbox


    【解决方案1】:

    答案是:这是不可能的。 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 部分中找到的维恩图。

    【讨论】:

      【解决方案2】:

      您需要的是超文本应用程序或 HTA。您使用 HTML 创建表单。

      【讨论】:

      • 是的,我提出了一个关于制作对话框的问题,有人提到了你所做的同样的事情。感谢您的帮助,我也一定会练习这种语言。
      猜你喜欢
      • 1970-01-01
      • 2012-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-24
      相关资源
      最近更新 更多