FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error in webexp compiled with Borland 582
Posts: 392
Joined: Tue Jul 29, 2008 01:55 PM
Error in webexp compiled with Borland 582
Posted: Sat Oct 22, 2011 03:44 PM

Hello FiveWinners

This example WebExp.prg of 10.3 FWH version compiled with the Borland version 5.82 does not work, it freezes when running the application.

Basically it turn explorer:

include "FiveWin.ch"

function Main()

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:GoHome()
oActiveX:Navigate( "http://www.google.com" )

// oActiveX:StatusBar = .t.

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

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

return nil

Anyone know the trick?

regards

Visite Chiapas, el paraiso de México.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Error in webexp compiled with Borland 582
Posted: Sat Oct 22, 2011 06:04 PM
devtuxtla

Try it this way ..

Rick Lipkin

Code (fw): Select all Collapse
#include "fivewin.ch"

//--------------------
Func Main()

local IE, cUrl,cSay


cURL := "www.google.com"

TRY
   IE := CreateObject("InternetExplorer.Application")
CATCH
   cSAY := "Could not Create Browser Object"
   MsgInfo( cSay )
   
   SysReFresh()
   RETURN(.F.)
END TRY

IE:Visible := .t. // .f. for invisible
IE:Navigate( cURL )

Do While IE:Readystate <> 4
   SysWait(.5)
   SysRefresh()
   Loop
Enddo

// ie should now be open .. 
// wait 10 seconds then close

SysWait(10)


try
   IE:Quit()
catch
end try

return(nil)
Posts: 392
Joined: Tue Jul 29, 2008 01:55 PM
Re: Error in webexp compiled with Borland 582
Posted: Sun Oct 23, 2011 06:59 PM

Hello Rick

Thanks for the reply.

This example opens the browser and the code will execute the page we want, but do so within the application window.

Is there any way that the page is displayed within the application, as does the example of WebExp?

regards

Visite Chiapas, el paraiso de México.

Continue the discussion