ayuda con tactivex

ayuda con tactivex

Postby GuillermoMtz » Thu Aug 29, 2013 5:55 pm

Estoy intentando generar exe de los ejemplos de prueba que vienen en fw versión 11, pero cuando ejecuto la aplicación llega hasta el llamado de la clase y ahi se cierra sin mandar ningún tipo de mensaje, no se si me falta agregar algo mas a mi aplicación dentro del exe o bien algún archivo externo, he probado varios de los ejemplos y en todos me pasa lo mismo, pero en el foro no encuentro que alguien comente algo parecido.
de antemano agradezco su apoyo.
_____________________________________________

NxTSolutions
Soluciones Integrales en Informatica
Sitio Web http://www.nxtsolutions.com.mx/
_____________________________________________
User avatar
GuillermoMtz
 
Posts: 14
Joined: Sat Sep 24, 2011 5:42 pm
Location: Chihuahua, Chihuahua, Mexico

Re: ayuda con tactivex

Postby acuellar » Thu Aug 29, 2013 6:29 pm

Guillermo
Coloca algún ejemplo y el error para que te podamos ayudar

Saludos,

Adhemar
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1593
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: ayuda con tactivex

Postby GuillermoMtz » Thu Aug 29, 2013 6:57 pm

Te anexo el ejemplo pero no me manda ningun error solo se cierra la aplicaicon.
function Verejemplo()
local oWnd, oActiveX
local cEvents := ""

DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

oActiveX = TActiveX():New( oWnd, "Shell.Explorer" )

oWnd:oClient = oActiveX // To fill the entire window surface
oActiveX:Navigate( "http://www.google.com" )

oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) }

ACTIVATE WINDOW oWnd ;
VALID ( MemoEdit( cEvents ), .t. )

return nil

function EventInfo( event, aParams, pParams, oActiveX )

local cMsg := "Event: " + cValToChar( event ) + CRLF
local n

cMsg += "Params: " + CRLF

for n = 1 to Len( aParams )
cMsg += cValToChar( aParams[ n ] ) + CRLF
next

if event == "BeforeNavigate2"
// MsgInfo( aParams[ 2 ] )
// SetEventParam( pParams, 7, .t. ) // Comment this to allow navigation
endif

return cMsg + CRLF
_____________________________________________

NxTSolutions
Soluciones Integrales en Informatica
Sitio Web http://www.nxtsolutions.com.mx/
_____________________________________________
User avatar
GuillermoMtz
 
Posts: 14
Joined: Sat Sep 24, 2011 5:42 pm
Location: Chihuahua, Chihuahua, Mexico

Re: ayuda con tactivex

Postby acuellar » Thu Aug 29, 2013 7:24 pm

Cambia el MemoEdit por ( MsgAlert( cEvents ), .t. )

Saludos,

Adhemar
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1593
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: ayuda con tactivex

Postby GuillermoMtz » Thu Aug 29, 2013 10:27 pm

Gracias Adhemar por tu apoyo, pero la aplicacion se cierra al crear el objeto del activex puse unas banderas a la tactivex para monitore y solo llega al pasa 2
te anexo el codigo.


METHOD New( oWnd, cProgID, nRow, nCol, nWidth, nHeight ) CLASS TActiveX

DEFAULT oWnd := GetWndDefault(), nRow := 0, nCol := 0, nWidth := 200,;
nHeight := 200

::nTop = nRow
::nLeft = nCol
::nBottom = nRow + nHeight
::nRight = nCol + nWidth
::oWnd = oWnd
::nId = ::GetNewId()
::nStyle = nOR( WS_CHILD, WS_VISIBLE, WS_TABSTOP )
::cProgID = cProgID
::cString = ActXString( cProgID )

::Register()
? 'paso1'
if ! Empty( oWnd:hWnd )
::Create()
oWnd:AddControl( Self )
? 'paso2'
::hActiveX = CreateActiveX( ::hWnd, cProgID, Self )
? 'paso3'
::oOleAuto = TOleAuto():New( ActXPdisp( ::hActiveX ) )

Saludos!
_____________________________________________

NxTSolutions
Soluciones Integrales en Informatica
Sitio Web http://www.nxtsolutions.com.mx/
_____________________________________________
User avatar
GuillermoMtz
 
Posts: 14
Joined: Sat Sep 24, 2011 5:42 pm
Location: Chihuahua, Chihuahua, Mexico


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests