ActiveX shell.explorer

ActiveX shell.explorer

Postby digordo » Mon Nov 07, 2011 4:28 pm

Fala Pessoal!

Estou tendo um problema usando o activex shell.explorer.
Uso ele para abrir uma pagina web em uma window ou dialog.
Acontece que, de forma intermitente, ocorre erro gpf ao abrir a pagina.
Alguem tem idéia do que pode estar ocorrendo?

Exemplo do código:
Code: Select all  Expand view

Function WebExe(cLink)
Local oDlg
Local oActiveX

DEFINE WINDOW oDlg TITLE "Help Online"

   oActiveX   := TActiveX():New( oDlg, "Shell.Explorer")
   
   oDlg:oClient = oActiveX
   
   oActiveX:bOnEvent = { | event, aParams, pParams | EventInfo( event, aParams, pParams, oActiveX ,"LINK DE ERRO") }
   
   
ACTIVATE WINDOW oDlg MAXIMIZED On Init (Navega(oActiveX,cLink))



Return


Static Function Navega(oActiveX,cLink)

oActiveX:Do('Navigate2',cLink)
while oActiveX:Document == nil
   SysRefresh()
end

Return .t.




Static function EventInfo( event, aParams, pParams, oActiveX , cLinkPad )
   If cValToChar( event )=="NavigateError" .and. (lWebError==Nil .or. !lWebError)
      lWebError := .t.
      oActiveX:Navigate(cLinkPad)
   EndIF
return
 



Erro:
Image
digordo
 
Posts: 13
Joined: Mon Aug 02, 2010 5:15 pm

Re: ActiveX shell.explorer

Postby roberio » Sun Dec 04, 2011 5:24 am

eu uso com janela.
ex:
Code: Select all  Expand view

Function AbreWebWin()
  Local oWndWeb, oActiveX, cURL:="http://www.google.com.br"

  DEFINE WINDOW oWndWeb From 10,10 To 43,90 TITLE "teste web"

   oActiveX = TActiveX():New( oWndWeb, "Shell.Explorer" )
   oWndWeb:oClient = oActiveX
   oActiveX:Do( "Navigate", cURL)
   oWndWeb:center()

   ACTIVATE WINDOW oWndWeb ON INIT BARRABOTOESMSN(oWndWeb, oActiveX)

Return nil

 
FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2
User avatar
roberio
 
Posts: 27
Joined: Fri Jul 22, 2011 4:04 am

Re: ActiveX shell.explorer

Postby Antonio Linares » Sun Dec 04, 2011 12:07 pm

Aqui samples\webexp.prg funciona bien y nunca ha dado ese problema.

Puedes probar el ejemplo estandard webexp.prg que nosotros incluimos en FWH ? gracias
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 35254
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to All products support

Who is online

Users browsing this forum: No registered users and 1 guest