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.
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.
Edited 6 Years Ago by 12345pj: n/a
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...