Olá pessoal estou com problemas para trabalhar com parametros da linha de comando. Eu estou tentando da seguinte forma:
No designer Application.xaml eu adicionei o seguinte:
<Application...
Startup="Application_Startup">
e no codebehind do Application.xaml:
Public Shared mArgs As String()
Private Sub Application_Startup(sender As Object, e As StartupEventArgs)
If e.Args.Length > 0 Then
mArgs = e.Args
End If
End Sub
Eu estou tentando obter os parametros no evento Initialized do form:
Private Sub window_Initialized(sender As Object, e As EventArgs) Handles window.Initialized
Dim args As [String]()
args = Application.mArgs
MsgBox(args)
End Sub
mas quando adiciono um argumento ele diz que não é possivel converter o argumento "Prompt" para o tipo "String".