473,320 Members | 1,957 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,320 software developers and data experts.

Command Prompt

Hello,

I want to start an application writen in VB.net by a
commmand prompt.
This application will put on a textbox one string
(string1) and in another textbox another string (string2).

The strings are given in command Prompt as the example:

"c:\programs\tests\test.exe string1 string2"

So, how can I read this strings when my application loads

Thanks in advance,

Luis
Nov 20 '05 #1
2 1111
From the help file

Dim arguments As [String]() = Environment.GetCommandLineArgs()

"Luis" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
Hello,

I want to start an application writen in VB.net by a
commmand prompt.
This application will put on a textbox one string
(string1) and in another textbox another string (string2).

The strings are given in command Prompt as the example:

"c:\programs\tests\test.exe string1 string2"

So, how can I read this strings when my application loads

Thanks in advance,

Luis

Nov 20 '05 #2
* "Luis" <an*******@discussions.microsoft.com> scripsit:
I want to start an application writen in VB.net by a
commmand prompt.
This application will put on a textbox one string
(string1) and in another textbox another string (string2).

The strings are given in command Prompt as the example:

"c:\programs\tests\test.exe string1 string2"

So, how can I read this strings when my application loads


\\\
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
///

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

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

Similar topics

2
by: msuk | last post by:
All, I am trying to use Regasm from the command prompt and have to keep putting the full file path of where my assembley is located. Does anyone know how to set it up so wherever I run the...
3
by: Rog | last post by:
Yes, I am guessing that typing cmd in the run windows will bring up the command prompt, but not the vs.net command prompt. Is there a switch(s) for accessing the vs.net command prompt? Or...
4
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is...
4
by: Thomas Johnson | last post by:
I am trying to find out how to access the VS 2003 .Net command prompt. I am trying to execute the 'csc' command against a module but have no idea where to find the command prompt. Here's a stupid...
6
by: Jwolf | last post by:
I have .net 2002 edu version and when it installed there was a shortcut to the .net command prompt. My CLR disk is scratched so I can't reinstall and so I just downloaded express. I dont know...
6
by: Shooter4Life8 | last post by:
Hi, I am having trouble figureing out the best way to open a command prompt then write lines to it in VB.NET. Currently I have this code, but it execute's too fast I think because Dim psi As...
9
by: Endless Story | last post by:
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
3
by: kimiraikkonen | last post by:
Hi experts, I just want to ask a simple procedure of my simple form. My form has a input textbox and a button. I want this if you can help me: Application user types a command prompt command...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.