Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Web-Designer's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Arizona, USA
    Posts
    270
    Reputation
    11
    Thanks
    53
    My Mood
    Fine

    [Help]Save music on a music Player

    (I searched 3 times, didn't find anything.)


    Okay you add the music you want, it plays it. . .then you restart it and you have to add the music again. . .How would you do it so you don't have to?

    Then when you pull it up you have to click one of the songs first. How would I get it to auto-play on start up. (But if theres no music it doesn't do anything.)


    (Off topic: I'm also trying to find out how to make the right-click pop-up window. . .)

    Thank you. (+1 Thanks & +Rep)

  2. #2
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Well idk about saving the song, but to auto play on start up have like a checkbox somewhere. Then double click it, should bring up Check_Changed event. Then create a new setting , caleld whatever you want and set it to Boolean, False.

    In the check_changed event, put in this code:

    [php]If CheckBox1.Checked = True Then
    My.Settings.(Yoursettingnamehere) = True
    Else
    My.Settings.(Yoursettingnamehere) = False
    End If[/php]

    On your Form_Load have this code:

    [php]If My.Settings.(settingnamehere) = True Then
    'Put your music play code here
    End If[/php]

    That shuld work xD

  3. The Following User Says Thank You to Invidus For This Useful Post:

    Web-Designer (09-08-2010)

  4. #3
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Are you adding each song to a listbox? If so then these two subs will save/load them respectively.

    [php]
    Private Sub SaveSongs()

    Using sWrite As New IO.StreamWriter(Application.StartupPath & "\SongList.dat", False)

    For Each s As String In ListBox1.Items
    sWrite.WriteLine(s)
    Next

    End Using

    End Sub

    Private Sub LoadSongs()

    Using sRead As New IO.StreamReader(Application.StartupPath & "\SongList.dat")

    Do Until sRead.EndOfStream
    ListBox1.Items.Add(sRead.ReadLine)
    Loop

    End Using

    End Sub
    [/php]

    The saved song list will be stored in a .dat file in the application startup path called "SongList"

    Whenever you want to save the songs simply do

    [php]
    SaveSongs()
    [/php]

    and to load them again

    [php]
    LoadSongs()
    [/php]

    Okay now you can save/load them you just need the autoplay option correct?

    Add this on form_load event.

    [php]

    Dim myRand as New Random()
    Dim i as Integer = myRand.Next(0, listbox1.Items.count)

    AxWindowsMediaPlayer1.URL = ListBox1.Items(i)
    AxWindowsMediaPlayer1.Ctlcontrols.play()

    [/php]

    This will randomly select a song from your list and start it playing. If you just want it to play the first song on the list, just remove the myRand and i variables completely and change this around.

    [php]
    AxWindowsMediaPlayer1.URL = ListBox1.Items(i) 'change this line to the line below!
    AxWindowsMediaPlayer1.URL = ListBox1.Items(0) 'This will play the first song in the list.
    [/php]


    Anything I missed?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  5. The Following 2 Users Say Thank You to Jason For This Useful Post:

    Sydney (09-08-2010),Web-Designer (09-08-2010)

  6. #4
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Aw you just complicated that xD
    Why do people use so complicated code like that xD
    Not saying its bad, just gives me a headache ^^
    Nice job.

  7. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by ilikewaterha View Post
    Aw you just complicated that xD
    Why do people use so complicated code like that xD
    Not saying its bad, just gives me a headache ^^
    Nice job.
    There isn't anything complicated about it lol, it's pretty straightforward as it is. If code like that gives you a headache you should probably consider a different hobby All I did was choose a song from the list on form_load and execute the play command for the windows media player. Oh yeah and two 4 line sub-procedures, what's difficult?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  8. #6
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Nah i'm just over-exaggerating.
    But just some of your code is out of my area lol.
    Its just not code i've encountered before xD

  9. #7
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by ilikewaterha View Post
    Nah i'm just over-exaggerating.
    But just some of your code is out of my area lol.
    Its just not code i've encountered before xD
    Examples pl0x? I'll explain them, as it's all simple stuff anyway

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  10. #8
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Okay then =P

    This bit

    Dim myRand as New Random()
    Dim i as Integer = myRand.Next(0, listbox1.Items.count)

    Whats a random?

    And this bit..

    Do Until sRead.EndOfStream

    Whats the use of Do Until?

  11. #9
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by ilikewaterha View Post
    Okay then =P

    This bit

    Dim myRand as New Random()
    Dim i as Integer = myRand.Next(0, listbox1.Items.count)

    Whats a random?

    And this bit..

    Do Until sRead.EndOfStream

    Whats the use of Do Until?
    Okay a random is a Random expression, when I use it with

    [php]
    Dim i as Integer = myRand.Next(0, listbox1.items.count)
    [/php]

    Essentially what it does is give the variable "i" a random integer value between 0 and ListBox1.Items.Count

    After we've got this "random" integer we use it to get a random listbox item

    [php]
    ListBox1.Items(i)
    [/php]

    ListBox items are indexed from 0 to however many items there is minus one and you can obtain a specific item by passing its index. In this case I just made it pick a random item from the listbox by using our "random" index.

    Hope I did a good enough job explaining that, now on to "Do until"

    Basically, by saying

    [php]
    Do Until sRead.EndOfStream
    [/php]

    I'm telling it to loop the following statements until we reach the end of the stream (in this case, the stream is the text stored in the .dat file I'm reading) This is easier than doing

    [php]
    Do
    If not sRead.Readline = "" then
    ListBox1.Items.Add()
    Else
    Exit Do
    End if
    Loop
    [/php]

    Where we have to check whether each line is empty or not to determine whether we are at the end of the text file. The "until" statement gives an easy exit to the "Do-Loop" block.

    Anything else?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  12. The Following User Says Thank You to Jason For This Useful Post:

    Web-Designer (09-08-2010)

  13. #10
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Nope, thanks a lot

  14. #11
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by ilikewaterha View Post
    Nope, thanks a lot
    No problemo, glad I could help.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  15. The Following User Says Thank You to Jason For This Useful Post:

    Invidus (09-07-2010)

  16. #12
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    /Thanked.
    I'ma go play around wit mah Visual Studio now =P

  17. #13
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    This looks solved to me.

  18. #14
    Web-Designer's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Arizona, USA
    Posts
    270
    Reputation
    11
    Thanks
    53
    My Mood
    Fine
    Okay well none of that helped. . .So. . .I came up with:

    made a text box, when clicked it opens a dialog you add whatever folder and all the mp3, wma, and mp4 files are added to the song list

    Now I jsut gotta find the bits of code to put it together lol
    Code:
    Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript.
    
    
    - Message me if I can help you with something, all I want is some credit!

  19. #15
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    None helped?

    Unsolved then.

  20. The Following User Says Thank You to Lolland For This Useful Post:

    Web-Designer (09-08-2010)

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] Ca Mp3 Music Player :D !COOL!
    By NexonShock in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 10
    Last Post: 02-08-2011, 05:11 PM
  2. [Release] Cf starter/music player/webpage loader/process starter/+more
    By XxTylerxX in forum CrossFire Hacks & Cheats
    Replies: 47
    Last Post: 04-12-2010, 05:28 PM
  3. best Music player While Playing CA?
    By Dant3 in forum Combat Arms Discussions
    Replies: 15
    Last Post: 01-18-2010, 02:30 PM
  4. need help changin music
    By tens2 in forum Combat Arms Hacks & Cheats
    Replies: 4
    Last Post: 08-15-2008, 09:52 PM
  5. Best Music Player?
    By arunforce in forum Entertainment
    Replies: 34
    Last Post: 09-03-2007, 04:09 PM