Solved

Command Arguments in Windows Forms Application

Posted on 2003-11-03
1
290 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 125 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 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