FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Calling a FiveWin program from DOS.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 04:51 AM

Is there a way to call, from a Clipper/DOS program , a FiveWin program to display an image, leave it open and return to the DOS program ? Due to time & size constraints right now I can't change the DOS program to FiveWin & xHarbour.

Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 05:00 AM

RUN
Execute a DOS command or program


Syntax

 RUN | !* <xcCommandLine>

Arguments

 <xcCommandLine> is any executable program including resident DOS
 commands and COMMAND.COM.  It may be specified either as a literal
 string or as a character expression enclosed in parentheses.

Description

 RUN executes a DOS command or program from within a compiled
 application.  When you RUN a DOS program, CA-Clipper executes another
 copy of COMMAND.COM, passing the DOS command line at the same time.
 This has two implications.  First, you must have enough memory for
 COMMAND.COM (5K for DOS 6.2) and the program you wish to execute.
 Second, COMMAND.COM must be available on the path specified by COMSPEC
 (the default is the root directory of the disk where you boot DOS).  If
 COMMAND.COM is not located on this disk or the disk is changed, SET
 COMSPEC to the new location prior to running the CA-Clipper application.
 Note that SET DEFAULT and SET PATH have no effect on RUN.

 The ! form of the RUN command is provided for compatibility purposes
 only and, therefore, is not recommended.

 Warning!  Do not RUN memory-resident programs from within CA-Clipper
 since you may lose memory when the control returns to your application
 program.

Examples

 .  This example uses RUN with MEMOREAD() and MEMOWRIT() to create
    a user-defined function that calls a text editor with the current
    memo field:

    lSuccess = EditorMemo("Qedit", "Notes")
    RETURN

    FUNCTION EditorMemo( cEditor, cMemofld )
       IF MEMOWRIT("Clipedit.tmp", &cMemofld.)
          RUN (cEditor + " Clipedit.tmp")
          REPLACE &cMemofld. WITH MEMOREAD("Clipedit.tmp")
          ERASE Clipedit.tmp
          RETURN .T.
       ELSE
          RETURN .F.
       ENDIF

 .  One of the options you may want to give your users is direct
    access to DOS.  Do this with:

    RUN COMMAND

    To make it easier for the user to return to the application program,
    change the DOS prompt in the application batch file like this:

    REM Application Batch File

    ECHO OFF
    PROMPT DOS Access: Type EXIT to return to ;
             application$_$p$g
    <your application program>
    PROMPT $p$g

    Then, instruct the user to execute the application batch file in
    place of the application .EXE file.

Files Library is CLIPPER.LIB.

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 05:07 AM

José Luis:

Thank you. Can I call a 32bit (xHarbour/FiveWin) program from DOS ? ¿ How can I display the image (BMP/JPG) in the xHarbour/FiveWin app ? The image must remain visible when I return to the DOS program ?

La gloria es de Dios ! Si, José Luis.

Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 05:14 AM
HunterEC wrote:José Luis:

Thank you. Can I call a 32bit (xHarbour/FiveWin) program from DOS ? ¿ How can I display the image (BMP/JPG) in the xHarbour/FiveWin app ? The image must remain visible when I return to the DOS program ?


La gloria es de Dios ! Si, José Luis.

Excuseme, i dont speak english, readed question and copy-paste slution i used. excuseme my bad english...Amen.
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 05:19 AM

José Luis:

Gracias por tu pronta ayuda. :D ¿ Es posible llamar un programa de 32 bit (xHarbour/FiveWin) desde DOS ? ¿ Cómo puedo mostrar la imagen (BMP/JPG) en un programa FiveWin/xHarbour ? La imagen debe quedar visible al momento de regresar al programa de DOS.

Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Calling a FiveWin program from DOS.
Posted: Thu Oct 30, 2008 05:29 AM
HunterEC wrote:José Luis:

Gracias por tu pronta ayuda. :-) ¿ Es posible llamar un programa de 32 bit (xHarbour/FiveWin) desde DOS ? ¿ Cómo puedo mostrar la imagen (BMP/JPG) en un programa FiveWin/xHarbour ? La imagen debe quedar visible al momento de regresar al programa de DOS.

HunterEC, habia entendido la pregunta, lo que no sabia es como responderte en ingles, te explico, tengo un sistema bajo xBase(DOS) y desde alli ejecuto programas e informes que he diseñado bajo FWH, al salir del sistema retorna por defecto al que lo llamo de DOS, sobre la imagen tendria que revisar y probar con mi sistema, nunca he llamado imagen desde el DOS, pruebo y te respondo, saludos..y Dios te Bendiga a ti tambien...God is my live..!
Dios no está muerto...



Gracias a mi Dios ante todo!

Continue the discussion