StungStang Posted May 17, 2011 Share Posted May 17, 2011 Hi to all,I want to write a media player application...I DONT want to use any exernel programm (like as windows media player, VLC ecc...). I see this libVLC dll (it's a part of VLC player) that allow me to reproduce a lot of format with a small dll.I have found on this forum about the integration of this dll in autoit, but i dont have found nothing.There is some UDF on the forum that use this dll?...Any help or something that will be usefull about that?Hi! Link to comment Share on other sites More sharing options...
StungStang Posted May 20, 2011 Author Share Posted May 20, 2011 Up Link to comment Share on other sites More sharing options...
Laymanball Posted May 17, 2014 Share Posted May 17, 2014 (edited) VB.net Sample code Audio & Video Player, Using axVLC.dll component. You must install VLC version 0.8.6 Click here (Other version not work) When setup finish, You'll see name vlc DLL into the Reference Com Choosed Add DLL v2 into the ToolBox ( DLL v1 not work) Example: Mini VLC Player expandcollapse popupImports System Imports System.Windows.Forms Public Class Form1 Inherits Form Private openfiles As OpenFileDialog Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load PlaylistCreated(ListBox1) TrackBar1.Maximum = 100 TrackBar1.Value = 100 TrackBar1.TickFrequency = TrackBar1.Maximum / 100 * 10 AxVLCPlugin21.audio.Volume = 100 End Sub Sub New() MyBase.New() Me.StartPosition = FormStartPosition.CenterScreen InitializeComponent() Me.Text = "MINI ALC PLAYER" openfiles = New OpenFileDialog openfiles.FileName = Nothing openfiles.Filter = "Support All Media Files(*.*)|*.*" openfiles.Multiselect = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If openfiles.ShowDialog = Windows.Forms.DialogResult.OK Then PlaylistAppendItem(openfiles.FileNames) End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ListBox1.SelectedItem = String.Empty Then Return AxVLCPlugin21.playlist.items.clear() If AxVLCPlugin21.playlist.items.count = 0 Then AxVLCPlugin21.playlist.add(PlaylistSelectedItem()) AxVLCPlugin21.playlist.play() Else MsgBox("Error!", MsgBoxStyle.Exclamation, "") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If ListBox1.SelectedItem = String.Empty Then Return AxVLCPlugin21.playlist.togglePause() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If Not AxVLCPlugin21.playlist.isPlaying Then Return AxVLCPlugin21.playlist.stop() AxVLCPlugin21.playlist.items.clear() End Sub Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged PlaylistSelectedItem() End Sub Private Sub ListBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick Button2.PerformClick() End Sub Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll AxVLCPlugin21.audio.Volume = TrackBar1.Value End Sub '=====================Playlist Created======================== Private playlist As New ListBox Private subCtlListBox As New ListBox Public Sub PlaylistCreated(ByVal ctlListBox As ListBox) subCtlListBox = ctlListBox ctlListBox.Controls.Add(playlist) playlist.Visible = False ctlListBox.HorizontalScrollbar = True End Sub Public Sub PlaylistAppendItem(ByVal FileNames As String()) For Each items As String In FileNames playlist.Items.Add(items) subCtlListBox.Items.Add(IO.Path.GetFileName(items)) Next If subCtlListBox.SelectedIndex = -1 Then subCtlListBox.SetSelected(0, True) playlist.SelectedIndex = subCtlListBox.SelectedIndex End If End Sub Public Function PlaylistSelectedItem() As String Dim ind As Integer = subCtlListBox.SelectedIndex playlist.SelectedIndex = ind Return playlist.SelectedItem End Function End Class Edited May 19, 2014 by Laymanball My Sample Script Download: VistaDesktopIconsChangerForXp.au3 (Com,Doc and Bin only) http://www.4shared.com/rar/NMHYL5Igba/VistaDesktopIconsChangerForXp_.html VistaDesktopIconsChangerForXp.exe (Resources) http://www.4shared.com/rar/nzs7Mb1gba/VistaDesktopIconsChangerForXp_.html Link to comment Share on other sites More sharing options...
funkey Posted May 17, 2014 Share Posted May 17, 2014 @Laymanball: This topic is already 3 years old and StungStang was not online here for about two years! And your example is missing Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now