Solved

Command Arguments in Windows Forms Application

Posted on 2003-11-03
1
286 Views
Last Modified: 2008-03-03
How can I read Command Arguments in a windows forms application (VC++.Net)?
0
Comment
Question by:VPitre
1 Comment
 
LVL 2

Accepted Solution

by:
steve_hsk earned 125 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Deserialize JSON array VB.Net problem 3 36
How do I get the id from URL? 19 46
Convert string to date 3 39
String manipulation 15 49
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)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now