|
-
Dec 31st, 2011, 10:09 AM
#1
Thread Starter
Member
Drag And Drop music/video files
Hello forumers ! How are you all ??
First of all, happy new 2012 !
And continuing...
I have a doubt. I'd like to make a program where you can drag music files (mp3, flac, wav, wma..) and video files (avi, mpeg, mp4, vob, mov) and get the property values of this ones...
For example, bitrate, KBps, size, etc, to put them in textbox or listboxes.
If you can teach me how, or give me any references or something, woulr be great !!
Thanks : D !
-
Dec 31st, 2011, 10:11 AM
#2
Frenzied Member
Re: Drag And Drop music/video files
Happy New Year to you too.
Here is the first part - drag files into your program: http://msdn.microsoft.com/en-us/library/ms973845.aspx
-
Dec 31st, 2011, 10:20 AM
#3
Re: Drag And Drop music/video files
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 31st, 2011, 10:32 AM
#4
Re: Drag And Drop music/video files
here's some more help with the dragdrop part:
vb Code:
Public Class Form1
Private Sub Form1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim droppedFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
Dim extensions() As String = {".mp3", ".flac", ".wav", ".wma", ".avi", ".mpeg", ".mp4", ".vob", ".mov"}
Dim acceptedFiles() As String = droppedFiles.Where(Function(s1) extensions.Any(Function(s2) s2 = IO.Path.GetExtension(s1))).ToArray
MsgBox(String.Join(Environment.NewLine, acceptedFiles))
End If
End Sub
Private Sub Form1_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragOver
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.None
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.AllowDrop = True
End Sub
End Class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|