在vb.net webbrowser中加载flash

时间:2015-05-20 02:25:56

标签: vb.net flash

我目前正在VB.net中开发一个Web浏览器。我已经设计了表格并通过浏览Facebook或Google进行测试。但是当我尝试去YouTube播放视频时,视频控件显示为黑色,我无法播放视频。

代码如下

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    WebBrowser1.Navigate(TextBox1.Text)
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub

Private Sub WebBrowser1_Navigating(sender As Object, e As WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
    ProgressBar1.Visible = True
    With ProgressBar1
        .Minimum = 0
        .Maximum = 50
        .Step = 5
    End With
    For index As Integer = 0 To 50 Step 5
        ProgressBar1.Value = index
        System.Threading.Thread.Sleep(35)
    Next
End Sub
End Class

我一直在寻找一种让网络浏览器能够播放Flash视频的方法,但我不知所措。

1 个答案:

答案 0 :(得分:0)

您的代码很好,可以在我的笔记本电脑上完美运行。

我怀疑你安装adobe flash player是罪魁祸首。

尝试卸载它,然后重新安装。

Preview of your code working with NO changes to code