Hi
I have made a program that i would like to be able to move from PC to PC; at the moment i would have to change the string directories within the program for each PC i would like top run it on.
By having the user select their drive letter and type their account name into a text box could this be implemented into a directory.
Below is the code, as i was hoping it was coded (lol never is tho).
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Filename As String = ("*.torrent")
Dim HDDLocation As String = TextBox1.Text
Dim AccountName As String = textbox2.text
If System.IO.File.Exists((HDDLocation)"documents and settings", (AccountName), (Filename)) = True Then
Try
My.Computer.FileSystem.DeleteFile((HDDLocation)"documents and settings", (AccountName), (Filename))
MessageBox.Show("Deleted")
Catch
MessageBox.Show("Unable to DELETE.", "Error")
End Try
End If
End Sub
Any help on this would be greatly appreciated.
Many thanks
Bagleys