|
Home > Archive > Programming with dBASE > March 2006 > Web browser on a form
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Web browser on a form
|
|
|
| I need to use the web browser to view html documents in a form. I reviewed the Dbulletin in which Jean-Pierre uses it to display html documents for the articles in Dbulletin. I believe (tho I may be missing something) the specifics of the code for this a
re stored in his search engine, and this code was confidential and not posted in the article. So have not been able to figure out how I use this control to display an html document in a form.
First, am I right that this web browser is an activx control? If so, is it already installed with Windows XP or will I need to download it? When I place an activex control on a form, and browse those available, there is not one clearly marked as the web
browser.
Has anyone any code to do something similar they can share? Basically, I need to have users browse thru a table using a form that can display a specific .htm file. The path and file name are stored in the table. The browser needs to load and display th
e file as they browse.
Hope someone has some advice. Thanks in advance for any ideas,
Rick
| |
| Ronnie MacGregor 2006-03-21, 3:25 am |
|
On Mon, 20 Mar 2006 15:00:22 -0500
Rick said :
> I need to use the web browser to view html documents in a form.
> Hope someone has some advice. Thanks in advance for any ideas,
Hi Rick
Go to this address and download the QR3 package.
http://www.dbasedeveloper.co.uk/QR3/QR3.htm
Look for PreviewHTML.wfm contained therein.
Hope this helps.
--
Ronnie MacGregor
Scotland
Ronnie at
dBASEdeveloper
dot co dot uk
www.dBASEdeveloper.co.uk
| |
|
|
> Has anyone any code to do something similar they can share? Basically, I
> need to have users browse thru a table using a form that can display a
> specific .htm file. The path and file name are stored in the table. The
> browser needs to load and display the file as they browse.
--------
Create a new form or use an existing form and bring up the component
palette. Right click the component palette and choose Setup ActiveX
components. In the left hand listbox scroll down to the Microsoft Web
Browser and click the ">" button to move the selection to the right hand
listbox and click OK. From the ActiveX tab of the component palette drag
and drop the web browser control onto the form and size it accordingly. In
order to navigate to the webpage that you want to display in the web browser
control use: "form.activex1.nativeObject.navigate2("thewebpagehere").
Here is a samples form:
** END HEADER -- do not remove this line
//
// Generated on 03/20/2006
//
parameter bModal
local f
f = new myBrowserForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class myBrowserForm of FORM
with (this)
onSize = class::FORM_ONSIZE
height = 25.7727
left = 2
top = 0
width = 91.7143
text = ""
endwith
this.ACTIVEX1 = new ACTIVEX(this)
with (this.ACTIVEX1)
height = 23.5909
left = 0
top = 2
width = 91.7143
l0 =
" FNBBBBBBQBFCBBBBELEG
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBFNBBBBBB
BBBBBBBBBBBBBBBBBCBB
BBBBPBOBGIBBIEEGNQCC
LPHKBJBBDMDPCDHDBJBB
BBBBBBBBBBBBFNBBBBBB
BCCFBDBBBBBBBBBBNBBB
BBBBBBBBBBFHJBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBB
BB"
l0 += " BBBBBBBBBBBBBBBBBCBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB"
state = l0
classId = "{8856F961-340A-11D0-A96B-00C04FD705A2}"
endwith
this.PUSHGO = new PUSHBUTTON(this)
with (this.PUSHGO)
onClick = class::PUSHGO_ONCLIC
K
height = 1.0909
left = 71.5714
top = 0.1364
width = 15.2857
text = "&Go"
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 0.7273
left = 1.5714
top = 0.2727
width = 12
text = "WebSite:"
endwith
this.ENTRYADDRESS = new ENTRYFIELD(this)
with (this.ENTRYADDRESS)
height = 1
left = 14.5714
top = 0.0455
width = 56.1429
value = ""
maxLength = 200
endwith
function PUSHGO_onClick
form.activex1.nativeObject.navigate2(trim(form.entryaddress.value))
return
function form_onSize(nSizeTyp
e, nWidth, nHeight)
form.activex1.width := nWidth
form.activex1.height:= nHeight
return
endclass
| |
| Ken Mayer [dBVIPS] 2006-03-21, 3:25 am |
| Rick wrote:
> I need to use the web browser to view html documents in a form. I reviewed the Dbulletin in which Jean-Pierre uses it to display html documents for the articles in Dbulletin. I believe (tho I may be missing something) the specifics of the code for this
are stored in his search engine, and this code was confidential and not posted in the article. So have not been able to figure out how I use this control to display an html document in a form.
>
> First, am I right that this web browser is an activx control? If so, is it already installed with Windows XP or will I need to download it? When I place an activex control on a form, and browse those available, there is not one clearly marked as the w
eb browser.
>
> Has anyone any code to do something similar they can share? Basically, I need to have users browse thru a table using a form that can display a specific .htm file. The path and file name are stored in the table. The browser needs to load and display
the file as they browse.
In addition to everything else, this is installed by default with
Windows. This is the control I used to demonstrate ActiveX in my book.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
|
| Ronnie,
Many thanks. Sure do appreciate all the help at this ng.
Rick
Ronnie MacGregor Wrote:
>
> On Mon, 20 Mar 2006 15:00:22 -0500
> Rick said :
>
>
>
> Hi Rick
>
> Go to this address and download the QR3 package.
>
> http://www.dbasedeveloper.co.uk/QR3/QR3.htm
>
> Look for PreviewHTML.wfm contained therein.
>
>
> Hope this helps.
>
> --
> Ronnie MacGregor
> Scotland
>
> Ronnie at
> dBASEdeveloper
> dot co dot uk
>
> www.dBASEdeveloper.co.uk
>
>
>
| |
|
| Ken,
Appreciate the help. You made it look easy.
Rick
Ken B Wrote:
>
> --------
> Create a new form or use an existing form and bring up the component
> palette. Right click the component palette and choose Setup ActiveX
> components. In the left hand listbox scroll down to the Microsoft Web
> Browser and click the ">" button to move the selection to the right hand
> listbox and click OK. From the ActiveX tab of the component palette drag
> and drop the web browser control onto the form and size it accordingly. In
> order to navigate to the webpage that you want to display in the web browser
> control use: "form.activex1.nativeObject.navigate2("thewebpagehere").
> Here is a samples form:
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 03/20/2006
> //
> parameter bModal
> local f
> f = new myBrowserForm()
> if (bModal)
> f.mdi = false // ensure not MDI
> f.readModal()
> else
> f.open()
> endif
>
> class myBrowserForm of FORM
> with (this)
> onSize = class::FORM_ONSIZE
> height = 25.7727
> left = 2
> top = 0
> width = 91.7143
> text = ""
> endwith
>
> this.ACTIVEX1 = new ACTIVEX(this)
> with (this.ACTIVEX1)
> height = 23.5909
> left = 0
> top = 2
> width = 91.7143
> l0 =
> " FNBBBBBBQBFCBBBBELEG
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBFNBBBBBB
BBBBBBBBBBBBBBBBBCBB
BBBBPBOBGIBBIEEGNQCC
LPHKBJBBDMDPCDHDBJBB
BBBBBBBBBBBBFNBBBBBB
BCCFBDBBBBBBBBBBNBBB
BBBBBBBBBBFHJBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBB
BBBB"
> l0 += " BBBBBBBBBBBBBBBBBCBB
BBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBB"
> state = l0
> classId = "{8856F961-340A-11D0-A96B-00C04FD705A2}"
> endwith
>
> this.PUSHGO = new PUSHBUTTON(this)
> with (this.PUSHGO)
> onClick = class::PUSHGO_ONCLIC
K
> height = 1.0909
> left = 71.5714
> top = 0.1364
> width = 15.2857
> text = "&Go"
> endwith
>
> this.TEXT1 = new TEXT(this)
> with (this.TEXT1)
> height = 0.7273
> left = 1.5714
> top = 0.2727
> width = 12
> text = "WebSite:"
> endwith
>
> this.ENTRYADDRESS = new ENTRYFIELD(this)
> with (this.ENTRYADDRESS)
> height = 1
> left = 14.5714
> top = 0.0455
> width = 56.1429
> value = ""
> maxLength = 200
> endwith
>
>
> function PUSHGO_onClick
> form.activex1.nativeObject.navigate2(trim(form.entryaddress.value))
> return
>
> function form_onSize(nSizeTyp
e, nWidth, nHeight)
> form.activex1.width := nWidth
> form.activex1.height:= nHeight
> return
> endclass
>
>
| |
|
| Hey Ken,
Yes, should have known it would be in the book. Usually go there first.
Thanks,
Rick
Ken Mayer [dBVIPS] Wrote:
> Rick wrote:
is are stored in his search engine, and this code was confidential and not posted in the article. So have not been able to figure out how I use this control to display an html document in a form.[color=darkred]
web browser.[color=darkred]
y the file as they browse.[color=darkred]
>
> In addition to everything else, this is installed by default with
> Windows. This is the control I used to demonstrate ActiveX in my book.
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
|
|
|
|
|