DEFINE WINDOW oWndnet MDICHILD OF oWnd vscroll icon oico TITLE ".:: Internet ::. "+alltrim(cENDE)
DEFINE BUTTONBAR oBarnet size 34,34 3D OF oWndnet
DEFINE BUTTON OF oBarnet resource "B1" NOBORDER ACTION( oActiveX:Do( "GoBack" ) ) MESSAGE "Voltar" tooltip "Voltar"
DEFINE BUTTON OF oBarnet resource "B2" NOBORDER ACTION( oActiveX:Do( "GoForward" ) ) MESSAGE "Avançar" tooltip "Avançar"
DEFINE BUTTON OF oBarnet resource "STOP2" NOBORDER ACTION( oActiveX:Do( "ExecWB",23,1 ) ) MESSAGE "Parar" tooltip "Parar"
DEFINE BUTTON OF oBarnet resource "REFRESH" NOBORDER ACTION( oActiveX:Do( "ExecWB",22,1 ) ) MESSAGE "Atualizar" tooltip "Atualizar"
DEFINE BUTTON OF oBarnet resource "SAVE2" NOBORDER ACTION( oActiveX:Do( "ExecWB", 4,1 ) ) MESSAGE "Salvar como" tooltip "Salvar como"
DEFINE BUTTON OF oBarnet resource "PRINT10" NOBORDER ACTION( oActiveX:Do( "ExecWB", 7,1 ) ) MESSAGE "Imprimir" tooltip "Imprimir"
DEFINE BUTTON OF oBarnet resource "QUIT2" NOBORDER ACTION( oWndnet:End() ) MESSAGE "Fechar" tooltip "Fechar"
oBarnet:bRClicked := { || ( NIL ) }
@ 0.7,42.5 say "Endereço:" of oBarnet size 50,18 font oFontenet
@ 0.7,38.5 btnget ocamnet var cENDE of oBarnet size 300,19 font oFontenet valid (if(GetKeyState( VK_RETURN ),obotnet:setfocus(),),.t.)
@ 0.4,102 buttonbmp obotnet PROMPT SPACE(5)+"&Ir" of oBarnet bitmap "SETA" size 50,22 TEXTRIGHT font oFontenet action(grava_parametro('FWULTIMOEMAIL',alltrim(cEnde)),oWndnet:ctitle(".:: Internet ::. "+alltrim(cENDE)), oActiveX:Do( "Navigate", alltrim(cENDE) ),cPesq:=space(100),ocamne2:refresh())
@ 0.7,113 say "Pesquisa:" of oBarnet size 50,18 font oFontenet
@ 0.7,91 btnget ocamne2 var cPesq of oBarnet size 213,19 font oFontenet valid (if(GetKeyState( VK_RETURN ),obotpes:setfocus(),),.t.)
@ 0.4,157.6 buttonbmp obotpes PROMPT SPACE(5)+"&Ir" of oBarnet bitmap "GOOGLE" size 50,22 TEXTRIGHT font oFontenet action(oWndnet:ctitle(".:: Internet - Pesquisa ::. "+alltrim(cPesq)),if(empty(cPesq),msg("Nenhuma palavra foi digitada!"),GoogleSearch(AllTrim(STRTRAN(cPesq," ","+")),@cENDE,ocamnet)))
oActiveX := TActiveX():New( oWndnet, "Shell.Explorer" )
oActiveX:SetProp( "StatusBar", .t. )
oWndnet:oClient := oActiveX
ACTIVATE WINDOW oWndnet MAXIMIZED on init(ocamnet:setfocus(),oActiveX:Do( "Navigate", alltrim(cSite) ));
valid(oActiveX:end(),.t.)
return(.t.)
******************************************
Function GoogleSearch(cAlgo,cENDE,ocamnet)
******************************************
local hE, cVar1, cVar3,cLink
cVar1 := "http://www.google.com/search?q="
cVar3 := "&ie=UTF-8&oe=UTF-8&hl=pt&btnG=B%C3%BAsqueda+en+Google&lr="
cLink := cVar1+cAlgo+cVar3
oActiveX:Do( "Navigate", cLink)
cEnde := space(100)
ocamnet:refresh()
SysRefresh()
return nil