• Log in or sign up for an account here: https://www.sythe.org/login

Simple Problem

X Zero

Forum Addict
Joined
Jan 21, 2007
Sythe Gold
0
Messages
577
Location
Australia, The South
Well, I have a simple problem, let me explain.

I have this code:
Code:
Public Sub New()
InitializeComponent()
On Error Resume Next
If File.Exists(String.Join(" ", Environment.GetCommandLineArgs(), 1, Environment.GetCommandLineArgs().Length - 1)) Then
 MsgBox(Environment.CurrentDirectory.ToString)
Me.textBox1.Text = File.ReadAllText(String.Join(" ", Environment.GetCommandLineArgs(), 1, Environment.GetCommandLineArgs().Length - 1))
End If
End Sub

new question how can it get the file name use the Environment thing

This how I got the path.
Code:
MsgBox(Environment.CurrentDirectory.ToString)


How can this be achived?
 
It would seem the command line arguments are read as dos strings. I'm not sure how do fix this, maybe by outputting it differently?
 
Runescape Gamblingrunescape gambling
Back
Top