Dim aa() As String = System.Environment.GetCommandLineArgs() If aa.Length > 1 Then Try Dim file As String = aa(1) Dim txtRead As StreamReader = New StreamReader(file) TextBox1.Text = txtRead.ReadToEnd() txtRead.Close() Catch ex As Exception MessageBox.Show("ERROR") End Try End If