質問

I'm trying to use the Process.Start function using a variable as the argument (file location) which has spaces in the file path.

The variable is made up of the result of a Grandparent, Parent & Child node text combination.

I've set the variable as Dim Loc as String = aMailbox & tvProgress.SelectedNode.Parent.Parent.Text & "\" & tvProgress.SelectedNode.Parent.Text & "\" & tvProgress.SelectedNode.Text however when the program is called (.exe file) and it displays the load path on the splash screen is points to the debug folder of the appliaction and not the actual path.

Any ideas

役に立ちましたか?

解決

So simply put the string into the quotes :)

Dim Loc As String = """" + aMailbox + tvProgress.SelectedNode.Parent.Parent.Text + "\" + tvProgress.SelectedNode.Parent.Text + "\" + tvProgress.SelectedNode.Text + """"
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top