473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

arguments passing.

Can anyone help?
e.g. when you open a vb project property page, in "Configuration
Properties"
You will see "Command line arguments" in "Start Options". Does anyone
knows how to find a way to do arguments passing. Thank you.

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 20 '05 #1
4 1939
"Justine" <mi***********@hotmail-dot-com.no-spam.invalid> schrieb
Can anyone help?
e.g. when you open a vb project property page, in "Configuration
Properties"
You will see "Command line arguments" in "Start Options". Does
anyone knows how to find a way to do arguments passing. Thank you.


To start another app and pass command line arguments:
shell "theother.exe arguments"
Or use
Process.Start
To use the command line arguments passed to your own app:
msgbox command 'Microsoft.VisualBasic.Interaction.Command

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
"Justine" <mi***********@hotmail-dot-com.no-spam.invalid> schrieb
Can anyone help?
e.g. when you open a vb project property page, in "Configuration
Properties"
You will see "Command line arguments" in "Start Options". Does
anyone knows how to find a way to do arguments passing. Thank you.


To start another app and pass command line arguments:
shell "theother.exe arguments"
Or use
Process.Start
To use the command line arguments passed to your own app:
msgbox command 'Microsoft.VisualBasic.Interaction.Command

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
* mi***********@hotmail-dot-com.no-spam.invalid (Justine) scripsit:
Can anyone help?
e.g. when you open a vb project property page, in "Configuration
Properties"
You will see "Command line arguments" in "Start Options". Does anyone
knows how to find a way to do arguments passing. Thank you.


You can enter arguments there. When starting the application outside
the IDE, you can use a shortcut or the console to pass arguments.

This code shows you how to get the passed data:

\\\
Public Sub Main(ByVal astrCmdLineArgs() As String)
Dim i As Integer
For i = 0 To astrCmdLineArgs.Length - 1
Console.WriteLine(astrCmdLineArgs(i))
Next i
End Sub
///

- or -

\\\
Public Sub Main()
Dim i As Integer
For i = 0 To Environment.GetCommandLineArgs().Length - 1
Console.WriteLine(Environment.GetCommandLineArgs(i ))
Next i
End Sub
///

Notice that the startup object must be set to 'Sub Main'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
* mi***********@hotmail-dot-com.no-spam.invalid (Justine) scripsit:
Can anyone help?
e.g. when you open a vb project property page, in "Configuration
Properties"
You will see "Command line arguments" in "Start Options". Does anyone
knows how to find a way to do arguments passing. Thank you.


You can enter arguments there. When starting the application outside
the IDE, you can use a shortcut or the console to pass arguments.

This code shows you how to get the passed data:

\\\
Public Sub Main(ByVal astrCmdLineArgs() As String)
Dim i As Integer
For i = 0 To astrCmdLineArgs.Length - 1
Console.WriteLine(astrCmdLineArgs(i))
Next i
End Sub
///

- or -

\\\
Public Sub Main()
Dim i As Integer
For i = 0 To Environment.GetCommandLineArgs().Length - 1
Console.WriteLine(Environment.GetCommandLineArgs(i ))
Next i
End Sub
///

Notice that the startup object must be set to 'Sub Main'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
by: Mike MacSween | last post by:
Just spent a happy 10 mins trying to understand a function I wrote sometime ago. Then remembered that arguments are passed by reference, by default. Does the fact that this slowed me down...
6
by: Melkor Ainur | last post by:
Hello, I'm attempting to build an interpreter for a pascal-like language. Currently, I don't generate any assembly. Instead, I just build an abstract syntax tree representing what I've parsed...
10
by: The Directive | last post by:
I read the C FAQ question on passing a variable number of arguments, but it didn't help. The example assumes all arguments are of the same type. I want to create a function "trace" that can be...
17
by: ex_ottoyuhr | last post by:
I'm trying to create a function that can take arguments, say, foo and bar, and modify the original copies of foo and bar as well as its local versions -- the equivalent of C++ funct(&foo, &bar). ...
3
by: PengYu.UT | last post by:
I quickly searched the group. Like the post said, it is not possible to specify indefinite number of arguments. ...
16
by: Martin Jørgensen | last post by:
Hi, Problem: ======== Some of my output functions are beginning to take pretty many arguments... I mean.... We're talking about 10-15 arguments :-) So I thought to myself, perhaps this is...
2
ADezii
by: ADezii | last post by:
When a call is made to a Sub or Function Procedure, you can supply Arguments in the exact order they appear in the Procedure's definition, or you can supply them in any position by name. To...
18
by: squaretriangle | last post by:
Is it possible through some trickery, perhaps using the methods of stdarg, to pass a dynamic (unknown at compile time) number of arguments to a function? For example, I want to enumerate an array...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.