Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
For Each item As ListViewItem In ListView1.Items
For Each item As ListViewItem In ListView1.SelectedItems
Public Class album1
Private Sub album1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ControlBox = False
PictureBox2.Image = New Bitmap(Application.StartupPath + "\hoesjes\1.jpg")
For Each file As IO.FileInfo In New IO.DirectoryInfo(Application.StartupPath + "\albums\1").GetFiles("*.mp3")
Dim lvi As New ListViewItem
lvi.Text = file.Name 'Alleen bestandsnaam als item tekst
lvi.Tag = file.FullName 'Volledige pad opslaan in de Tag property. Elk item heeft zn eigen Tag
lvi.SubItems.Add(Application.StartupPath + "\albums\1")
ListView1.Items.Add(lvi)
Next
End Sub
Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Albums.Show()
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyDirectory(
Application.StartupPath & "\albums\1",
open.SelectedPath, _
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, _
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
End Sub
Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click
Pc_info.Show()
End Sub
Private Sub ListView1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.Click
AxWindowsMediaPlayer1.URL = ListView1.SelectedItems(0).Tag
Label2.Text = ListView1.SelectedItems(0).Text
End Sub
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
Dim afsluiten As Integer
afsluiten = MsgBox("wil je echt afsluiten?", vbDefaultButton2 + vbYesNo, "Waarschuwing")
If afsluiten = vbYes Then
End
Else
End If
End Sub
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
AxWindowsMediaPlayer1.settings.volume = TrackBar1.Value
Label10.Text = TrackBar1.Value
End Sub
[COLOR="red"]Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyFile(
ListView1.SelectedItems.Item(0).SubItems(1).Tag,
open.SelectedPath,
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
End Sub[/COLOR]
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
AxWindowsMediaPlayer1.settings.mute = True
Else
AxWindowsMediaPlayer1.settings.mute = False
End If
End Sub
End Class
Public Class album1
Private Sub album1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ControlBox = False
PictureBox2.Image = New Bitmap(Application.StartupPath + "\hoesjes\1.jpg")
For Each file As IO.FileInfo In New IO.DirectoryInfo(Application.StartupPath + "\albums\1").GetFiles("*.mp3")
Dim lvi As New ListViewItem
lvi.Text = file.Name 'Alleen bestandsnaam als item tekst
lvi.Tag = file.FullName 'Volledige pad opslaan in de Tag property. Elk item heeft zn eigen Tag
lvi.SubItems.Add(file.FullName)
ListView1.Items.Add(lvi)
Next
End Sub
Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Albums.Show()
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyDirectory(
Application.StartupPath & "\albums\1",
open.SelectedPath, _
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, _
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
End Sub
Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click
Pc_info.Show()
End Sub
Private Sub ListView1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.Click
AxWindowsMediaPlayer1.URL = ListView1.SelectedItems(0).Tag
Label2.Text = ListView1.SelectedItems(0).Text
End Sub
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
Dim afsluiten As Integer
afsluiten = MsgBox("wil je echt afsluiten?", vbDefaultButton2 + vbYesNo, "Waarschuwing")
If afsluiten = vbYes Then
End
Else
End If
End Sub
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
AxWindowsMediaPlayer1.settings.volume = TrackBar1.Value
Label10.Text = TrackBar1.Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyFile(
ListView1.SelectedItems.Item(0).SubItems(1).Text,
open.SelectedPath,
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
AxWindowsMediaPlayer1.settings.mute = True
Else
AxWindowsMediaPlayer1.settings.mute = False
End If
End Sub
End Class
Public Class album1
Private Sub album1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ControlBox = False
PictureBox2.Image = New Bitmap(Application.StartupPath + "\hoesjes\1.jpg")
For Each file As IO.FileInfo In New IO.DirectoryInfo(Application.StartupPath + "\albums\1").GetFiles("*.mp3")
Dim lvi As New ListViewItem
lvi.Text = file.Name 'Alleen bestandsnaam als item tekst
lvi.Tag = file.FullName 'Volledige pad opslaan in de Tag property. Elk item heeft zn eigen Tag
lvi.SubItems.Add(file.FullName)
ListView1.Items.Add(lvi)
Next
End Sub
Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Albums.Show()
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyDirectory(
Application.StartupPath & "\albums\1",
open.SelectedPath, _
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, _
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
End Sub
Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click
Pc_info.Show()
End Sub
Private Sub ListView1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.Click
AxWindowsMediaPlayer1.URL = ListView1.SelectedItems(0).Tag
Label2.Text = ListView1.SelectedItems(0).Text
End Sub
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
Dim afsluiten As Integer
afsluiten = MsgBox("wil je echt afsluiten?", vbDefaultButton2 + vbYesNo, "Waarschuwing")
If afsluiten = vbYes Then
End
Else
End If
End Sub
Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
AxWindowsMediaPlayer1.settings.volume = TrackBar1.Value
Label10.Text = TrackBar1.Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
[COLOR="red"] My.Computer.FileSystem.CopyFile(
ListView1.SelectedItems.Item(0).SubItems(1).Text,
open.SelectedPath,
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)[/COLOR]
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
AxWindowsMediaPlayer1.settings.mute = True
Else
AxWindowsMediaPlayer1.settings.mute = False
End If
End Sub
End Class
Dim save As New SaveFileDialog
save.Filter = "MP3 Bestanden (*.mp3)|*.mp3"
If save.ShowDialog = DialogResult.OK Then
Try
IO.File.Copy(ListView1.SelectedItems.Item(0).SubItems(1).Text, save.SelectedFile)
Catch ex As Exception
MsgBox(ex.Message,16,"Fout")
End Try
Dim save As New SaveFileDialog
save.Filter = "MP3 Bestanden (*.mp3)|*.mp3"
If save.ShowDialog = DialogResult.OK Then
Try
IO.File.Copy(ListView1.SelectedItems.Item(0).SubItems(1).Text, save.[COLOR="red"]Filename[/COLOR])
Catch ex As Exception
MsgBox(ex.Message,16,"Fout")
End Try
dannydaboy zei:Is het trouwens mogelijk om meerdere items gelijktijdig te kopieren als je meerdere items selecteert?
Dim open As New FolderBrowserDialog
If open.ShowDialog = DialogResult.OK Then
My.Computer.FileSystem.CopyDirectory(
Application.StartupPath & "\albums\1",
open.SelectedPath, _
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, _
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
End If
JoZ1 zei:Als ik jou was, zou ik een 'Lijst-Exporteren'-knop maken en een 'Nummer-Exporteren'-knop maken. (Zie voorbeeldproject voor Lijst-Exporteren-code)
dannydaboy zei:is er nog een manier om de totale tijd van alle items in de listview te tonen (in een tectbox of als label)en om de tijd van draaiend nummer te tonen?
dannydaboy zei:Ik wil je echt bedanken voor je inzet want ik kan me voorstellen dat je gek van me word )
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.