如何最有效地将 HTML iframe 嵌入到我的 C# 应用程序中。
让我们说这个 youtube 视频:
<iframe width="560" height="315" src="//www.youtube.com/embed/UJ53Js0YKZM" frameborder="0" allowfullscreen></iframe>
我试过这个但没有用:
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAbout))
'
'frmVirtual
'
Me.Text = "Virtual"
Me.VirtualView = New WebBrowser
Me.VirtualView.Navigate("<iframe src='https://www.google.com/maps/embed?pb=!1m0!3m2!1sen!2sau!4v1481252003737!6m8!1m7!1sF%3A-pwYGx-oWTIk%2FWC6LeJuIxdI%2FAAAAAAAABIg%2FphppDvMZr54JiWnLbsbUgDcTGUfGXLMRACLIB!2m2!1d-33.76525136331761!2d150.9088391438127!3f310!4f0!5f0.7820865974627469' width='600' height='450' frameborder='0' style='border: 0' allowfullscreen></iframe>")
Me.SuspendLayout()
End Sub
C# 应用程序当然是 Windows 窗体应用程序。它不一定是视频,当然也可以是带有链接的小横幅,当然是在 Iframe 中。请帮忙!
原文由 Mr. Curious 发布,翻译遵循 CC BY-SA 4.0 许可协议