ClickOnceで引数を取る方法
VB.NET
If (ApplicationDeployment.IsNetworkDeployed) Then
'ClickOnce application
'起動側の記述例 hoge.exe.appref-ms "引数1,引数2,引数3"
'ActivationData(0)に"引数1,引数2,引数3"が入ってきます。
Dim url As String = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData(0)
'引数の数をカウントする
argsCnt = CountChar(url, ",")
'引数があれば配列に格納する
If argsCnt > 0 Then
arg = url.Split(",")
End If
Else
'normal application
'Dim args() As String = Environment.GetCommandLineArgs()
End If