Saludos a Todos
Necesito llamar aplicacion externa y esta deber谩 mostrarse dentro de mi aplicacion, si el usuario maxima la aplicacion externa debera hacerlo dentro de la ventana MDI de mi.
aplicacion
Agradecido por su valioso aporte.
Saludos a Todos
Necesito llamar aplicacion externa y esta deber谩 mostrarse dentro de mi aplicacion, si el usuario maxima la aplicacion externa debera hacerlo dentro de la ventana MDI de mi.
aplicacion
Agradecido por su valioso aporte.
聽 聽LOCAL cComando
聽 聽cComando := "h:\Desarrollo\Externo\NewProgram.exe"
聽 聽WinExec( cComando )
聽 聽贸
聽 聽WaitRun( cComando )karinha wrote:Intentas:
聽 聽LOCAL cComando 聽 聽cComando := "h:\Desarrollo\Externo\NewProgram.exe" 聽 聽WinExec( cComando ) 聽 聽贸 聽 聽WaitRun( cComando )
Saludos.
#include "fivewin.ch"
#define SW_HIDE 0
#define SW_SHOWNORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_MAXIMIZE 3
#define SW_SHOWMAXIMIZED 3
#define SW_SHOWNOACTIVATE 4
#define SW_SHOW 5
#define SW_MINIMIZE 6
#define SW_SHOWMINNOACTIVE 7
#define SW_SHOWNA 8
#define SW_RESTORE 9
#define SW_SHOWDEFAULT 10
//------------------------------------//
ShellExecute( oDlg:hWnd, "open", cExe,,, SW_SHOWNORMAL )karinha wrote:y con ShellExecute?
#include "fivewin.ch" #define SW_HIDE 聽 聽 聽 聽 聽 聽 0 #define SW_SHOWNORMAL 聽 聽 聽 1 #define SW_SHOWMINIMIZED 聽 聽2 #define SW_MAXIMIZE 聽 聽 聽 聽 3 #define SW_SHOWMAXIMIZED 聽 聽3 #define SW_SHOWNOACTIVATE 聽 4 #define SW_SHOW 聽 聽 聽 聽 聽 聽 5 #define SW_MINIMIZE 聽 聽 聽 聽 6 #define SW_SHOWMINNOACTIVE 聽7 #define SW_SHOWNA 聽 聽 聽 聽 聽 8 #define SW_RESTORE 聽 聽 聽 聽 聽9 #define SW_SHOWDEFAULT 聽 聽 10 //------------------------------------// 聽 聽ShellExecute( oDlg:hWnd, "open", cExe,,, SW_SHOWNORMAL )
Saludos.
It is not possible to show every external application inside our program window. It is possible with OCX (Activex) applications only.
However, if your requirement is MS Word, Excel or PowerPoint, it is possible.

cnavarro wrote:Juan, te refieres a llamar a otra aplicaci贸n ( como por ejemplo Notepad.exe ) ? e incrustarla dentro de la mdichild?
Esto?
Qu茅 versi贸n utilizas?
Como te llamas?
Mr. Cristobal
This is wonderful.
Can you please provide the code?
cnavarro wrote:Qu茅 versi贸n utilizas?
Como te llamas?
#include "FiveWin.ch"
Static oWnd
Static oWndChild
Static nRow 聽 聽 聽 聽:= 0
Static nCol 聽 聽 聽 聽:= 0
Static nHChild 聽 聽 := 650
Static nWChild 聽 聽 := 1000
Static hWin
function Main()
聽 聽DEFINE WINDOW oWnd MDI FROM 0, 0 TO 750, 1300 PIXEL ;
聽 聽 聽 TITLE "A sample of a MDI environment" MENU MyMenu()
聽 聽ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
Function MyMenu()
聽 聽local oMnu
聽 聽MENU oMnu
聽 聽 聽 MENUITEM "Create_Child" ACTION ( CreaChild() )
聽 聽 聽 MENUITEM "Exit" 聽 ACTION oWnd:End()
聽 聽ENDMENU
Return oMnu
//----------------------------------------------------------------------------//
Function CreaChild()
聽 聽DEFINE WINDOW oWndChild MDICHILD OF oWnd ;
聽 聽 聽 FROM nRow + 1 , nCol TO nHChild, nWChild PIXEL ;
聽 聽 聽 COLOR CLR_WHITE, METRO_OLIVE
聽 聽ACTIVATE WINDOW oWndChild ;
聽 聽 聽 ON PAINT ( Externo() )
return oWndChild
//----------------------------------------------------------------------------//
#define GW_HWNDNEXT 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 2
#define GW_CHILD 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽5
#define GWL_STYLE 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 -16
#define GWL_EXSTYLE 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 -20
#define SWP_NOZORDER 聽 聽 聽 聽 聽 聽 聽 聽 0x0004
#define SWP_NOREDRAW 聽 聽 聽 聽 聽 聽 聽 聽 0x0008
#define SWP_FRAMECHANGED 聽 聽 聽 聽 聽 聽 0x0020
#define SWP_NOOWNERZORDER 聽 聽 聽 聽 聽 聽0x0200
#define SWP_ASYNCWINDOWPOS 聽 聽 聽 聽 聽 0x4000
#define HWND_TOP 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽0
#define HWND_BOTTOM 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 1
//----------------------------------------------------------------------------//
STATIC FUNCTION Externo()
聽 聽local nStyle
聽 聽local lIni 聽 聽:= .T.
聽 聽if Empty( hWin )
聽 聽 聽 WinExec( "Notepad" )
聽 聽 聽 hWin := FindWnd( "Bloc" )
聽 聽else
聽 聽 聽 lIni 聽:= .F.
聽 聽endif
聽 聽if !Empty( hWin )
聽 聽 聽 if lIni
聽 聽 聽 聽 聽nStyle 聽 聽 聽 聽 聽:= GetWindowLong( hWin, GWL_STYLE )
聽 聽 聽 聽 聽nStyle 聽 聽 聽 聽 聽-= WS_CAPTION
聽 聽 聽 聽 聽nStyle 聽 聽 聽 聽 聽-= WS_SYSMENU
聽 聽 聽 聽 聽nStyle 聽 聽 聽 聽 聽+= WS_THICKFRAME
聽 聽 聽 聽 聽SetParent( hWin, oWndChild:hWnd )
聽 聽 聽 聽 聽SetWindowLong( hWin, GWL_STYLE, nStyle )
聽 聽 聽 endif
聽 聽 聽 SetPosExt( hWin )
聽 聽 聽 SetFocus( hWin )
聽 聽endif
RETURN NIL
//----------------------------------------------------------------------------//
Function FindWnd( cTitle )
聽 聽local hWnd1 := GetWindow( GetDesktopWindow(), GW_CHILD )
聽 聽local lSw 聽 := .F.
聽 聽while hWnd1 != 0
聽 聽 聽 if Upper( cTitle ) $ Upper( GetWindowText( hWnd1 ) )
聽 聽 聽 聽 聽lSw 聽:= .T.
聽 聽 聽 聽 聽Exit
聽 聽 聽 endif
聽 聽 聽 hWnd1 = GetWindow( hWnd1, GW_HWNDNEXT )
聽 聽end
return if( lSw, hWnd1, nil )
//----------------------------------------------------------------------------//
Function SetPosExt( hWnd )
聽 聽 聽local aRect 聽 聽 聽 聽:= GetClientRect( hWnd )
聽 聽 聽local nAncho 聽 聽 聽 := oWndChild:nWidth - 10
聽 聽 聽local nInc 聽 聽 聽 聽 := 1
聽 聽 聽local nInc1 聽 聽 聽 聽:= 0
聽 聽 聽local aPos 聽 聽 聽 聽 := Array( 4 )
聽 聽 聽DEFAULT aPos[ 1 ] 聽:= 2
聽 聽 聽DEFAULT aPos[ 2 ] 聽:= 2
聽 聽 聽DEFAULT aPos[ 3 ] 聽:= nAncho - 12
聽 聽 聽DEFAULT aPos[ 4 ] 聽:= oWndChild:nHeight - nInc - nInc1 - aPos[ 1 ]
聽 聽 聽SetWindowPos( hWnd, HWND_TOP, ; //BOTTOM, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽aPos[ 1 ] + nInc, aPos[ 2 ] + 1, aPos[ 3 ], aPos[ 4 ], ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽nOr( SWP_ASYNCWINDOWPOS, SWP_FRAMECHANGED, SWP_NOOWNERZORDER, SWP_NOZORDER, SWP_NOREDRAW ) ) //, SWP_NOZORDER ) )
Return nil
//----------------------------------------------------------------------------//Navarro
Muy agradecido por los buenos oficios,
Afirmativo es lo que necesito para que un de mis clientes cree aplicaciones en otro lenguaje y los ejecuta esde mi aplicacion y el usuario lo asuma como una funcionalidad mas de mi sistema.
Tambien me interesa saber como o con que haces el video muy ilustrativo para la explicaci贸n.
Juan, utilizo una aplicacion gratuita LICECAP, para crear GIFs porque es muy f谩cil de utilizar y sin instalaci贸n
Tambi茅n es muy buena otra aplicaci贸n: SCREENTOGIF, que te permite editar el GIF generado despu茅s de grabarlo