Create load song file path
-
Monday, March 12, 2012 3:03 AM
Dear Frank,
Could you please create song file path for the last project?
Best Regards,
Kalunche
All Replies
-
Monday, March 12, 2012 5:01 PM
Ok, try this. The entire project folder zipped up is here:
http://www.fls-tech.com/VBNet_Forum/03-12-12/Song_Data_Program_For_Kalunche.zip
This is what I've added:


- Proposed As Answer by Mark Liu-lxfModerator Tuesday, March 13, 2012 2:50 AM
- Marked As Answer by Mark Liu-lxfModerator Tuesday, March 20, 2012 6:26 AM
-
Monday, March 26, 2012 4:26 PM
Dear Frank,
I just checked my mail today. yah, your did it very well. I have a problem while clicking on Play Selected song it's show an error messagebox "Object reference not set to an instance of an object".
Kind regards,
Kalunche
Kalunche,
You're going to have to figure out how to diagnose these sorts of problems with your own programs eventually; I can't (won't) keep writing entire programs and handing them out like candy.
It works here - I tested it before I sent it to you and I just tested it again now.
You might start by doing this:
Private Sub ToolStripButton_PlaySong_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles ToolStripButton_PlaySong.Click ToolStripButton_PlaySong.Enabled = False Me.Refresh() Dim rowNum As Integer = SongInfoBindingSource.Position If rowNum > -1 Then ' Try Process.Start(Song_InfoDataSet.SongInfo(rowNum).SongFilePath).WaitForExit() ToolStripButton_PlaySong.Enabled = True Me.Refresh() 'Catch ex As Exception ' MessageBox.Show("An error occurred:" & vbCrLf & vbCrLf & ex.Message, _ ' "File I/O Error", MessageBoxButtons.OK, MessageBoxIcon.Error) 'End Try End If End Sub
Look above and you'll see that I've commented out the Try/Catch. When it fails next time, your debugger will allow you to see the entire message, not just the short message. Examine where it's failing and then from that, determine why it did.
For instance, is it just that particular song or all songs? Is it a particular type (extension) song or just what?
Like I said, it's working here - so I can't really be of much help beyond that.
- Marked As Answer by Kalunche Monday, March 26, 2012 4:41 PM
-
Friday, March 30, 2012 11:35 AM
Dear Frank,
I've been tried following your code on step song file path but if's error on LastFolderUsed is not a member of "WindowsApplication1.My.MySettings"
I should have explained; mea culpa.
I set up a field/variable (not sure what the term is) in Application.Settings so that each time you select a folder, the next time it will remember that folder and default to go there (if it exists).
Here's how you can set it up in your version of the program - At the top of Solution Explorer, double-click "My Project":

Now click on the tab marked "Settings":

As you see above, type in (exactly) "LastFolderUsed" for the name. It will default to a string and that's what you want so at that point, just re-compile the program and it should work.
- Marked As Answer by Kalunche Friday, March 30, 2012 3:58 PM
-
Tuesday, April 10, 2012 11:08 AM
Kalunche,
What is it that you need me to do? I still do not understand.
-
Sunday, April 29, 2012 5:18 AM
Dear Frank,
Could you please add button send song file path to USB Flash on the form play selected song?
Kind regards,
Kalunche
-
Sunday, April 29, 2012 12:15 PM
Dear Frank,
Could you please add button send song file path to USB Flash on the form play selected song?
Kind regards,
Kalunche
You want me to do that after you reporting me as "abusive"? Despite all that I'd done for you for free you reported me as abusive ... but you want me to do more?
It's not that difficult Kalunche - you just need to think out what needs to be done.
- Get the filepath (it's stored in the datatable).
- Determine how many (if any) removable drives they have and which of them are "ready".
- Present the user with a list, asking them which drive they want to send it to and, optionally, if they want to put it in a specific folder (and if so, which one).
Please call me Frank :)
-
Sunday, April 29, 2012 1:15 PM
Dear Frank,
I didn't attempted to do that because this thread have double answers so i tried to remove it some but i choose to the wrong word and my english knowledge was too bad.
With best regards,
Kalunche
-
Sunday, April 29, 2012 1:32 PM
Dear Frank,
I didn't attempted to do that because this thread have double answers so i tried to remove it some but i choose to the wrong word and my english knowledge was too bad.
With best regards,
Kalunche
We'll just chalk it up to being an unfortunate misunderstanding then.
Try what I suggested and if you get stuck then reply back about where you are with it and where you're having difficulty.
Also, you might want to have a look at something that I posted the other day:
That one might give you some ideas on making a new program.
Please call me Frank :)
-
Sunday, April 29, 2012 4:44 PM
Dear Frank,
This Just similar to what i posted the other day . That one it reverse from this because it can be showing tag , edit and insert custom picture to the mp3 song.
Kind regards,
Kalunche
-
Tuesday, May 01, 2012 11:25 PM
Dear Frank,
This is the code i posted another day. It's show the name of USB Flash drive. But stlill get stuck of how to drop down filepath to USB removable drive from the row we right clicked (It's mean that can be multi select rows and send in the same time into usb flah drive.
Private Sub DataGridView1_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) HandlesDataGridView1.MouseDown'if right click then show the menu
If e.Button = MouseButtons.Right Then
Dim m As New ContextMenuStrip()
m.Items.Add("SendTo")
Dim subItem As ToolStripMenuItem = CType(m.Items(0), ToolStripMenuItem)
Dim fullNames As IList(Of [String]) = New List(Of [String])()
For Each driveInfo__1 As DriveInfo In DriveInfo.GetDrives()
If driveInfo__1.DriveType = DriveType.Removable Then
'add removable dirve to sendto menuitem
subItem.DropDownItems.Add(driveInfo__1.ToString)
Else
' subItem.DropDownItems.Add(driveInfo__1.ToString)
End If
Next
m.Show(DataGridView1, New Point(e.X, e.Y))
End If
End Sub
End Class
Best Regards,
Kalunche
-
Wednesday, May 02, 2012 4:35 PM
Kalunche,
I keep saying that I'm not going to do this stuff on this program, but here I am again. I've modified the program to include a context menu for "Send To":


In the form's load event, you'll see this added into it. The way that I have it set up is that it first looks to see if there are any removable drives and, if so, are they "ready". If none are found, then the context menu isn't added but if there is at least one found, then it is. Note that this is only done during the loading of the form, so if they were to plug one in while the program is on, the program wouldn't see it.
When the user clicks on a drive to "send it to", it's then sent to this sub to do the work.
The entire code is shown here and the project folder, zipped, is here.
I hope that helps. :)
Please call me Frank :)
-
Wednesday, May 02, 2012 4:46 PM
I spotted an oversight in my code that you need to correct:
That's in the sub added (the very bottom of the code) and I meant to show a messagebox with ex.Message in it. Please add that.
Please call me Frank :)
-
Thursday, May 03, 2012 3:20 AM
Dear Frank,
It's so greate Frank, you are so kind. And i still left some components to add more and make to be a perfect song data program or we can say a song request program with new interface and i will keeping you as my reference who helped me to successfully made this program .
With Best regards,
Kalunche
-
Saturday, May 12, 2012 12:25 PMThat would need to be done completely differently. I'd suggest another form for that and the process to be run in a backgroundworker.
Please call me Frank :)
-
Wednesday, May 30, 2012 2:01 PM
Dear Frank,
Could you please go back ? I still left 2 things. I've been posted another threads name "Send Path files from all rows in DataGridView" and "'Get fillby from database .sdf to ComboBoxes"
Kind regards,
Kalunche
I'm not the only one here who can do this stuff Kalunche, and honestly - what are you learning at all by having someone do it for you?
I'm not going to get involved ... sorry
Please call me Frank :)

