Hi I'm writing a program in vb.net. The program can be started from another program by passing some arguments or it can be lauched by clicking .exe. I'd like to show the user some options depending on where he is coming. Is the below approach correct?
Private Sub Main_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Environment.GetCommandLineArgs(0).ToString = "SomeArgument" Then
'Do some events
Else
'Do some other events
End If
End Sub
Thanks for your help.