User Control Panel
Advertisements

HELP US, HELP YOU!

messenger 4.7 advanced what im listening to beta

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Visual Basic
View unanswered posts
Author Message
-DeadRabit-
Newbie
Newbie


Joined: 07 Apr 2007
Posts: 9

Reputation: 4.5Reputation: 4.5Reputation: 4.5Reputation: 4.5
votes: 1

PostPosted: Wed Oct 24, 2007 11:30 am    Post subject: messenger 4.7 advanced what im listening to beta Reply with quote

Code:

Option Explicit
Public WithEvents msn As MsgrObject

Private Type TagInfo
    Tag As String * 3
    Songname As String * 30
    artist As String * 30
    album As String * 30
    year As String * 4
End Type

Dim filename As String
Dim CurrentTag As TagInfo

Function Play()

'//Decode The MP3
On Error Resume Next
filename = List1.Text
Open filename For Binary As #1
With CurrentTag
    Get #1, FileLen(filename) - 127, .Tag
    If Not .Tag = "TAG" Then
        Close #1
      '  Exit Sub
    End If
    Get #1, , .Songname
    Get #1, , .artist
    Get #1, , .album
    Get #1, , .year
    Close #1
   
    strsongname.Text = (.Songname)
    strartist.Text = (.artist)
    stryear.Text = (.year)
    stralbum.Text = (.album)
   
    '//Set Song Clock To 00:00
    Label5.Caption = 0
    Label4.Caption = 0
    Timer4.Enabled = True
   
    '//Play The MP3
    WindowsMediaPlayer1.URL = List1.Text
    WindowsMediaPlayer1.Controls.Play
   
    'Text3.Text = "  : Listening to :/ " & " Album : " & stralbum.Text & " / Song: " & strsongname.Text & " / Artist: " & strartist.Text & " / Year : " & stryear.Text & "/ Duration: " & WindowsMediaPlayer1.currentMedia.durationString
   
End With

    Timer1.Enabled = True

End Function

Function SetDName()
   
   '//Set The Messenger Display Name To Song Info
   On Error Resume Next
   msn.Services.PrimaryService.friendlyName = "  Currently Listening to :/ " & " Album : " & stralbum.Text & " / Song: " & strsongname.Text & " / Artist: " & strartist.Text & " / Year : " & stryear.Text & "/ Duration: " & "0" & Label4.Caption & ":" & Label5.Caption & "/" & WindowsMediaPlayer1.currentMedia.durationString

End Function

Private Sub Form_Load()
     
     '// set messnger object blah blah
    On Error Resume Next
    Set msn = New MsgrObject
   
    '// Centering the form
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
   
   
    '// set timer to a interval it can change your name without getting flagged
    Timer1.Interval = 7500

End Sub

Private Sub KewlButtons1_Click()

 '//play the song
   Call Play
   
End Sub

Private Sub KewlButtons2_Click()
   
   '//move forward a track
   List1.ListIndex = List1.ListIndex + 1
   Call Play

End Sub

Private Sub KewlButtons3_Click()

  '//move back a track
   List1.ListIndex = List1.ListIndex - 1
   Call Play

End Sub

Private Sub KewlButtons4_Click()

'// Load An MP3 Into List1
   CommonDialog1.DialogTitle = "Load An MP3."
   CommonDialog1.filename = ""
   CommonDialog1.Filter = "MP3 Format|*.MP3"
   CommonDialog1.ShowOpen
   If CommonDialog1.FileTitle <> "" Then
   List1.AddItem CommonDialog1.filename
Exit Sub
Else
Exit Sub
End If

End Sub

Private Sub KewlButtons5_Click()

   '//Kill The Program
   Unload Me

End Sub


Private Sub msn_OnTextReceived(ByVal pIMSession As Messenger.IMsgrIMSession, ByVal User As Messenger.IMsgrUser, ByVal bstrMsgHeader As String, ByVal bstrMsgText As String, pfEnableDefault As Boolean)

   '//send the name of the song if they send '!song'
   Select Case bstrMsgText
   Case "!song"
   User.SendText bstrMsgHeader, Text3.Text, MMSGTYPE_ALL_RESULTS
   End Select

End Sub

Private Sub Slider1_Click()

   '//Change song volume
   WindowsMediaPlayer1.settings.volume = Slider1.Value

End Sub

Private Sub Slider3_Click()

   '// set the speed of song ex.(playrate x2)
   On Error Resume Next
   WindowsMediaPlayer1.settings.Rate = Slider3.Value

End Sub

Private Sub Timer1_Timer()

   '// Change Msn Name
   Call SetDName

End Sub


Private Sub Timer4_Timer()

   '// Quick ass stop watch i made for song duration
   Label5.Caption = Label5.Caption + 1
   If Label5.Caption = "60" Then
   Label5.Caption = "0"
   Label4.Caption = Label4.Caption + 1
   End If

End Sub



enjoy



watimlisteningto.rar
 Description:
1st beta

Download
 Filename:  watimlisteningto.rar
 Filesize:  4.18 KB
 Downloaded:  234 Time(s)

Back to top
-DeadRabit-
Newbie
Newbie


Joined: 07 Apr 2007
Posts: 9

Reputation: 4.5Reputation: 4.5Reputation: 4.5Reputation: 4.5
votes: 1

PostPosted: Wed Oct 24, 2007 12:30 pm    Post subject: Reply with quote

more helpfull?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Visual Basic All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group