SaveFileDialog
Page 1 of 113 Replies - 4754 Views - Last Post: 28 November 2009 - 11:15 AM
#1
SaveFileDialog
Posted 28 November 2009 - 10:30 AM
Hi. How do i get the selected path with a savefiledialog without the filename?
#3
Re: SaveFileDialog
Posted 28 November 2009 - 10:33 AM
Try something like this:
SaveFileDialog1.ShowDialog()
Dim blah As String = SaveFileDialog1.FileName
Dim meh As Integer = blah.LastIndexOf("\")
Dim lala As String = blah.Substring(0, meh)
dim yourPath as string = lala
This post has been edited by LeisureProgrammer: 28 November 2009 - 10:34 AM
#4
Re: SaveFileDialog
Posted 28 November 2009 - 10:47 AM
LeisureProgrammer, on 28 Nov, 2009 - 09:33 AM, said:
Try something like this:
SaveFileDialog1.ShowDialog()
Dim blah As String = SaveFileDialog1.FileName
Dim meh As Integer = blah.LastIndexOf("\")
Dim lala As String = blah.Substring(0, meh)
dim yourPath as string = lala
hm. i got error on
Dim lala As String = blah.Substring(0, meh)
saying something like "length cant be 0" not sure how to translate it becuse mine is in swedish.
#5
Re: SaveFileDialog
Posted 28 November 2009 - 10:48 AM
Are you picking a file from the file dialog?
#6
Re: SaveFileDialog
Posted 28 November 2009 - 10:50 AM
#7
Re: SaveFileDialog
Posted 28 November 2009 - 10:56 AM
That should work too - just make sure the variable is populated with a path-like thing - right after showing the savefiledialog, do this:
Does the full path appear?
msgbox(savefiledialog1.filename)
Does the full path appear?
This post has been edited by LeisureProgrammer: 28 November 2009 - 10:59 AM
#8
Re: SaveFileDialog
Posted 28 November 2009 - 10:56 AM
This should do it.
System.IO.Path.GetFileNameWithoutExtension(SaveFileDialogBox.FileName)
#9
Re: SaveFileDialog
Posted 28 November 2009 - 10:59 AM
Deathx, that's the exact opposite of what he wants 
EDIT: Deathx's code is waayy more efficient, use his
EDIT: Deathx's code is waayy more efficient, use his
This post has been edited by LeisureProgrammer: 28 November 2009 - 11:04 AM
#10
Re: SaveFileDialog
Posted 28 November 2009 - 11:02 AM
Heh sorry i read it wrong.
Then this should do it
.
Then this should do it
System.IO.Path.GetDirectoryName(SaveFileDialog.FileName)
#11
Re: SaveFileDialog
Posted 28 November 2009 - 11:06 AM
Thanks DeathX 
i dont know why i dont tried that one
i dont know why i dont tried that one
#13
Re: SaveFileDialog
Posted 28 November 2009 - 11:07 AM
Could you plz take a look at an other problem of mine?
http://www.dreaminco...mp;#entry847418
The new name you just help me solve
http://www.dreaminco...mp;#entry847418
The new name you just help me solve
#14
Re: SaveFileDialog
Posted 28 November 2009 - 11:12 AM
I've read that and I'm sorry I cant be of any help there.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|