I found something on Sergey's site in which he provides a link to Calvin Hsia code for inserting webrowser into vfp screen. This is a feature that i would find useful as it allows easy access to net material that is relevant to our program. I have a modified version below i would like to use where the user chooses from 4-5 sites we often require access to.
However once the initial program selects a site, it seems stuck on the same same despite to change of variable selected for SITE. I am probably missing some syntax i have tried remove class, clear class etc but still seem to be stuck on initial selection. How would clear memory to select different site. I suspect it's something like destroy event but if so - what is the systax?
thanks
k
And thanks to Sergey for his posting of endless gems!
do netted
activate popup mnubef
SITE = " "
proc netted
DEFINE POPUP mnubef relative COLOR SCHEME 6 FROM 3,55 FONT 'tahoma',11 ;
DEFINE Bar 1 of mnuBef PROMPT 'site 1 someplace'
DEFINE Bar 2 OF mnuBef PROMPT 'site 2 someplace else"
DEFINE Bar 3 OF mnuBef PROMPT 'site 3'
DEFINE Bar 4 OF mnuBef PROMPT 'etc
DEFINE Bar 5 OF mnuBef PROMPT 'Return to Menu'
On Selection Popup mnubef Do netter
proc netter
do case
case bar()=1
site = "https://somewhere.com"
DO NETUP
case bar()=2
site = "http://somewhere else.ca"
DO NETUP
case bar()=3
site = "http://www.google.ca/"
DO NETUP
case bar()=4
site = "http://www.another place.ca/"
DO NETUP
case bar()=5
clear
deactivate popup mnubef
return
endcase
procedure netup
PUBLIC ox
ox=NEWOBJECT("myformx")
BINDEVENT(_screen,"resize",ox,"resize")
ox.show
DEFINE CLASS myformx as Form
ADD OBJECT txtURL as textbox WITH width=400,value=SITE
ADD OBJECT oweb as cweb WITH top=30
width=800
height=800
alwaysonbottom=.t.
allowoutput=.f.
titlebar=0
PROCEDURE init
this.oweb.width=thisform.Width
thisform.resize
this.oweb.height=thisform.height-thisform.txtURL.height-2
thisform.txtURL.valid
PROCEDURE resize
thisform.Width=_screen.Width
thisform.Height=_screen.height
this.oweb.top=30
this.oweb.height=thisform.Height-100
this.oweb.width=thisform.width-thisform.left
PROCEDURE txtURL.valid
thisform.oweb.navigate(this.value)
ENDDEFINE
DEFINE CLASS cweb as olecontrol
oleclass="shell.explorer.2"
PROCEDURE refresh
nodefault
ENDDEFINE