By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,261 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,261 IT Pros & Developers. It's quick & easy.

parameter to the file .exe

P: n/a
the file .exe in the vbnet can received a parameter
how can i received this parameter by code ??
Feb 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi
if you use VS.2005 & your project type is Windows Application

Partial Friend Class MyApplication
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As
Microsoft.VisualBasic.ApplicationServices.StartupE ventArgs) Handles
Me.Startup
Dim firstParameter As String
firstParameter = e.CommandLine(0)

End Sub
End Class

and if it is Console Application :

Sub Main(ByVal args() As String)
Dim firstParam As String
If args.Length > 0 Then
firstParam = args(0)
End If
End Sub

A.Hadi

Feb 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.