Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Command Arguments in Windows Forms Application

Posted on 2003-11-03
1
Medium Priority
?
292 Views
Last Modified: 2008-03-03
How can I read Command Arguments in a windows forms application (VC++.Net)?
0
Comment
Question by:VPitre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
steve_hsk earned 500 total points
ID: 9673283
Hi VPitre ...

String *arguments[]   = Environment::GetCommandLineArgs();
      
// ***** NOTE ***** The command line arguments include the path and
//                  filename as the first argurment.
      
// 1.1 Ensure that there are enough Arguments to process
if (arguments->Count < 2)
{
     // 1.2 Parse the Command Line Strings         
    if (arguments[1]->ToUpper() == "-HELP")
    {
        // 1.3 Produce the Help Screen Text to the User
        ShowHelp();
    }
}

Hope this helps :-)
STeve
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question