πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #746

Re: Parameters with my program

#746
From: John Smith
Date: Tue, 07 Mar 2006 08:02
89 lines
2876 bytes
Hello RS.

I use it in my program and it works:

#include <vcl.h>

void __fastcall TBrowse::FormCreate(TObject *Sender)
{
  Browse->Table1->TableName = LowerCase(ParamStr(1));
  Browse->Table1->Active = true;
}

or in the main program:

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    try
    {
        Application->Initialize();
        AnsiString Test;
        Test = LowerCase(ParamStr(1));
        if (  ExtractFileExt ( Test ) == ".dbf" )
        {
                 Application->CreateForm(__classid(TBrowse), &Browse);
                 Application->Run();
           }
           else
           {
                 Application->CreateForm(__classid(TForm1), &Form1);
                 Application->Run();
           }




"RS" <rs.reloaded@wanadoo.fr> schrieb im Newsbeitrag
news:4408a8fa@newsgroups.borland.com...
> Sorry,
>
> I'm finding !!! the function ParamStr() !!!!  Thanks ;)
>
> Happy week-end !!!
>
> and dot not to forget  :
>
> file://-----------------------------
> void  Thanks_to_Remy()
> {
> int number=1;
>
> while(number==1)
>   {
>    thanks (Remy,Gambit);
>   }
> }
> file://-----------------------------
>
> lol
>
> ;)
>
>
> "RS" <rs.reloaded@wanadoo.fr> a οΏ½crit dans le message de news:
> 44088f93$1@newsgroups.borland.com...
> >
> > Hi,
> >
> > I would like initially to thank the people who answer in theses
> > newsgroups, and in particular Remy , because they enabled me to advance
on
> > my project which traine since weeks!
> >
> > I am perhaps not in the good newsgroup , my question is :
> >
> > I have created a program : prog.exe with Borland C++ Builder.
> >
> > My program is supposed to copy files (like xcopy.exe of ms-dos), with
two
> > parameters : file1 and file2.
> >
> > my program is supposed to do this : progr.exe c:\file1.txt c:\file2.txt
> >
> > I don't know how I include this 2 paramaters in my source code !
> > my_function(file1,file2);
> >
> > Many thanks ;)
> >
>
>
Technical Details
Message-ID: <440d3e03@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44088f93$1@newsgroups.borland.com> <4408a8fa@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,dbc09343f1ee5a9
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII
From: "John Smith" <NoSpam@NoSpam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <44088f93$1@newsgroups.borland.com> <4408a8fa@newsgroups.borland.com>
Subject: Re: Parameters with my program
Date: Tue, 7 Mar 2006 09:02:13 +0100
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
NNTP-Posting-Host: 212.202.128.58
Message-ID: <440d3e03@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141718531 212.202.128.58 (7 Mar 2006 00:02:11 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail