Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'NB: You MUST add a COM reference to iTunes
- Public Class Form1
- Private itunesControl As New iTunesLib.iTunesApp
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- TitleLabel.Text = itunesControl.CurrentTrack.Name
- ArtistLabel.Text = itunesControl.CurrentTrack.Artist
- AlbumLabel.Text = itunesControl.CurrentTrack.Album
- VolumeNumericUpDown.Value = itunesControl.SoundVolume
- End Sub
- Private Sub PreviousButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PreviousButton.Click
- itunesControl.PreviousTrack()
- End Sub
- Private Sub PlayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlayButton.Click
- itunesControl.Play()
- End Sub
- Private Sub NextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextButton.Click
- itunesControl.NextTrack()
- End Sub
- Private Sub PauseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PauseButton.Click
- itunesControl.Pause()
- End Sub
- Private Sub StopButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopButton.Click
- itunesControl.Stop()
- End Sub
- Private Sub RewindButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RewindButton.Click
- itunesControl.Rewind()
- End Sub
- Private Sub FFButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FFButton.Click
- itunesControl.FastForward()
- End Sub
- Private Sub ShuffleButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShuffleButton.Click
- itunesControl.CurrentPlaylist.Shuffle = True
- End Sub
- Private Sub RepeatOneButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RepeatOneButton.Click
- itunesControl.CurrentPlaylist.SongRepeat = iTunesLib.ITPlaylistRepeatMode.ITPlaylistRepeatModeOne
- End Sub
- Private Sub RepeatAllButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RepeatAllButton.Click
- itunesControl.CurrentPlaylist.SongRepeat = iTunesLib.ITPlaylistRepeatMode.ITPlaylistRepeatModeAll
- End Sub
- Private Sub ShuffleNoButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShuffleNoButton.Click
- itunesControl.CurrentPlaylist.Shuffle = False
- End Sub
- Private Sub RepeatNoButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RepeatNoButton.Click
- itunesControl.CurrentPlaylist.SongRepeat = iTunesLib.ITPlaylistRepeatMode.ITPlaylistRepeatModeOff
- End Sub
- Private Sub MuteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MuteButton.Click
- itunesControl.Mute = True
- End Sub
- Private Sub VolumeNumericUpDown_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VolumeNumericUpDown.ValueChanged
- itunesControl.SoundVolume = VolumeNumericUpDown.Value
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement