DOSLIB and DCL question

Discussion in 'AutoCAD' started by GTVic, Dec 20, 2004.

  1. GTVic

    GTVic Guest

    I have a DCL dialog that launches a Word document and then closes. The document is launched with dos_execute.

    When Word opens the document is in the foreground. But then the DCL dialog closes and the focus goes back to AutoCAD. So the end result is that Word flashes on screen for a moment and then disappears. I would like Word to remain the active application.

    Greg
     
    GTVic, Dec 20, 2004
    #1
  2. GTVic

    Daron Denton Guest

    try dos_execwait

    Executes an external program, then waits for termination before returning
    control to the calling application.
    Syntax
    (dos_exewait command [show])
    Parameters
    command
    The command to run, including arguments.

    show
    How the newly opened window is to be shown. The default value is Normal
    (0).

    0
    Normal. Activates and displays a window. If the window is
    minimized or maximized, the system restores it to its original size and
    position. An application should specify this flag when displaying the window
    for the first time.

    1
    No Active. Displays a window in its most recent size and
    position. This value is similar option 0, except the window is not
    activated.

    2
    Minimized. Activates the window and displays it as a minimized
    window.

    3
    Minimized Not Active. Displays the window as a minimized window.
    This value is similar to option 2, except the window is not activated.

    4
    Maximized. Activates the window and displays it as a maximized
    window.




    --
    Daron
    Peace, Luff, Cheetos


    document is launched with dos_execute.
    dialog closes and the focus goes back to AutoCAD. So the end result is that
    Word flashes on screen for a moment and then disappears. I would like Word
    to remain the active application.
     
    Daron Denton, Dec 21, 2004
    #2
  3. GTVic

    Daron Denton Guest

    sorry for the formatting, looked fine before i sent it.
     
    Daron Denton, Dec 21, 2004
    #3
  4. GTVic

    GTVic Guest

    But I'm not sure I want to hang AutoCAD like that.

    I think what is happening is that the focus moving from the DCL to the AutoCAD main window is delayed by the process of launching MS Word and then hits when the system recovers.

    I need a way to force the focus to AutoCAD and then launch Word.
     
    GTVic, Dec 21, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.