Hello all! I need your help. In my case, i want to add some video if there was 'event button click' , can visual studio vb.net 2005 do that? thanks before :D

You can fairly easy run WMP from VB on the event you want.

I have done it in VB.NET 2008, which by the way can be downloaded for free as can Visual Studio 2010 Visual basic (.NET).

The following code can run the WMP and play from a URL, I assume it can play the video from a file too, very easily.

My code looks like this, it was just a small test I did some time ago, it will play the Netradio channel "100FM" but can also run streamed Video.

You can hide it if you play a radio channel but just put visible to true and it will be visible.

My code

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    While 
            AxWindowsMediaPlayer1.URL = "http://radio100fm.dk/netradio/asx"
            'I assume this should work - AxWindowsMediaPlayer1.URL = "Path/Filename"

    End Sub

   
    Private Sub AxWindowsMediaPlayer1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxWindowsMediaPlayer1.Enter
        AxWindowsMediaPlayer1.Visible = False
    End Sub

End Class

You need to add WMP to your "Toolbox" and the use it from there.

But I think you forgot to search the web for descriptions on how to do, search for "play video visual basic 2008" it gives you different posibilities on how to implement it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.