Вопрос

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