PC Review


Reply
Thread Tools Rate Thread

arguments passing.

 
 
Justine
Guest
Posts: n/a
 
      12th Jan 2004
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 =---
 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      12th Jan 2004
"Justine" <(E-Mail Removed)> 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

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      12th Jan 2004
* (E-Mail Removed)lid (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>
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing 2 arguments to a sub Southern at Heart Microsoft Access VBA Modules 4 14th Feb 2008 11:42 PM
Passing arguments from VBA to DLL mkluwe@gmail.com Microsoft Excel Programming 10 18th Aug 2006 09:08 AM
Passing arguments Hector via AccessMonster.com Microsoft Access Form Coding 2 13th Apr 2005 07:35 PM
Passing Arguments Grant Reid Microsoft Excel Programming 8 24th May 2004 01:39 PM
Passing Arguments? Kris Rockwell Microsoft ASP .NET 2 11th Apr 2004 02:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:24 PM.