Name of the Application and Command line arguments
-
Using VB.NET 2003, how do you access the name and path of the running application. I have found where you can use the command function (Microsoft.VisualBasic.Command()), but this returns a string of the arguments that are after the name of the application. In C you can access this as the 1st element of the array of the command line arguments argv[0].
-
Using VB.NET 2003, how do you access the name and path of the running application. I have found where you can use the command function (Microsoft.VisualBasic.Command()), but this returns a string of the arguments that are after the name of the application. In C you can access this as the 1st element of the array of the command line arguments argv[0].
VbCode:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sName As String = Application.ExecutablePath
MessageBox.Show(sName) '/// this will show the application's exe path and the application's .exe name.
End Sub
hope it helps :) Vb:
Public Function TwinsOnWay(ByVal twins As String) As String
Select Case twins
Case "Gender"
Return "Two Girls"
End Select
End Function