Board index » delphi » BIG, BIG problem...

BIG, BIG problem...

I have one realy big(for me) problem...

I wan't to create one program(fro example PRG1), and one button on that
PRG1...then...when I click on that button I wan't to create new program(PRG2
for example), and button(BUTTON2 for example) on that program...so when I
click at BUTTON2 I want him to say 'Hello !'... is that possible to do from
delphi's program ?

Thank's...a lot...

 

Re:BIG, BIG problem...


...old fashion Soldier... <gil...@EUnet.yu> wrote in message
news:7kru1d$b2s$1@SOLAIR2.EUnet.yu...

Quote
> I have one realy big(for me) problem...

> I wan't to create one program(fro example PRG1), and one button on that
> PRG1...then...when I click on that button I wan't to create new
program(PRG2
> for example), and button(BUTTON2 for example) on that program...so when I
> click at BUTTON2 I want him to say 'Hello !'... is that possible to do
from
> delphi's program ?

> Thank's...a lot...

1. Yes.

2. If by program you mean a window then you want to create two forms in your
project, call them PRG1 and PRG2. In Project | Options | Forms remove PRG2
from the Auto Create Forms list. In the PRG1.Button1.OnClick handler place
the code

with tPRG2.Create (Application) do
    Show;

Add the PRG2 unit to the Uses clause in the interface section of the PRG1
unit.

3. If you really mean two distinct programs, then create two projects, call
them PRG1 and PRG2. In the PRG1.Button1.OnClick handler place the code

WinExec ('PRG2.EXE', SW_SHOWNORMAL);

(You may need to fully specify the path for PRG2.EXE). Compile PRG2 then you
can compile and run PRG1.

4. If you mean that you want to create the PRG2 program when PRG1.Button1 is
pressed, then you can do that to - you'd have to have PRG1 write the source
code for PRG2, then run the Delphi command line compiler, and finally run
PRG2.

5. In summary, Delphi can probably do what you want.

Re:BIG, BIG problem...


Hi Bruce !!! Thanks a lot !!!

Quote
>> I wan't to create one program(fro example PRG1), and one button on that
>> PRG1...then...when I click on that button I wan't to create new
>program(PRG2
>> for example), and button(BUTTON2 for example) on that program...so when I
>> click at BUTTON2 I want him to say 'Hello !'... is that possible to do
>from
>> delphi's program ?

>> Thank's...a lot...

>1. Yes.

>2. If by program you mean a window then you want to create two forms in
your
>project, call them PRG1 and PRG2. In Project | Options | Forms remove PRG2
>from the Auto Create Forms list. In the PRG1.Button1.OnClick handler place
>the code

>with tPRG2.Create (Application) do
>    Show;

>Add the PRG2 unit to the Uses clause in the interface section of the PRG1
>unit.

not form, I know to create form, in program...I wan't PROGRAM TO CREATE FROM
PROGRAM !!

Quote
>3. If you really mean two distinct programs, then create two projects, call
>them PRG1 and PRG2. In the PRG1.Button1.OnClick handler place the code

>WinExec ('PRG2.EXE', SW_SHOWNORMAL);

>(You may need to fully specify the path for PRG2.EXE). Compile PRG2 then
you
>can compile and run PRG1.

yes, that's how I can do if I know how to create PRG2, but if I don't know ?
my job is to create a program for creating presentations...I have ideae to
create one program, and to create text file who will calling all pictures,
and sounds, from directories on wich will point that text file...(I hope
that you understand, I have realy bad english...)

Quote
>4. If you mean that you want to create the PRG2 program when PRG1.Button1
is
>pressed, then you can do that to - you'd have to have PRG1 write the source
>code for PRG2, then run the Delphi command line compiler, and finally run
>PRG2.

this is what I am interested in, so if you please can help me about that,
I'll be realy pleased !!!
what code should I have, and how it will look like ?
how to compile that code in the midle of PRG1 action...
so if you can write example for those buttons, and those two programs, it
will help me a lot...

I'm been looking forwar to "read" you...

Quote
>5. In summary, Delphi can probably do what you want.

I'm glad !!!!

Regards from Gile...

Other Threads