Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the VFP Web Browser control

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
Hi,

Working in VFP9 SP2.

I'm wanting to show html pages in a pageframe on a form, but they don't work very well.

I have one control that shows our Intranet home page. In the form Init event I have:
Code:
THIS.pgfMain.Page2._WEBBROWSER41.Navigate2([[URL unfurl="true"]http://10.0.0.1/intranet/top.htm[/URL]])

However, when I click on the tab for that page, it appears that only then does it start to navigate to the page and looks very messy while doing so.

The other scenario is that on another page I have an edit box with some buttons that insert html markups around selected text. I have another button to show the user how what they've typed will look on an html page. Here's the code in the click:
Code:
IF THIS.Tag = [text]
  THIS.Parent.webText.Navigate2(ADDBS(evUserAppData)+[WowCmsTemp.htm])
  MESSAGEBOX(THIS.Parent.webText.NavigateComplete2([],ADDBS(evUserAppData)+[WowCmsTemp.htm]))
  THIS.Parent.webText.Visible = .T. &&  .ZOrder(0)
  THIS.Parent.webText.ZOrder(0)
  THIS.Tag = [html]
ELSE
  THIS.Parent.edtDetail.Visible = .F. && .ZOrder(0)
ENDIF

The web browser object "webText" is exactly under the edit box.

The MESSAGEBOX pops up with .T.. The webText control comes on top of the edit box. The visible property is true, the cUrl property is the filename I've specified, but I can't actually see the web control.

Can anyone suggest what's going on? Is there another control I can use instead?

Thanks,

Stewart
 
Hi Mike,

Nope.

I found where I was using the browser control successfully before - the browser control sat on the form and so it started navigating as soon as the form appeared.

It seems that navigation only happens when the control is visible.

Perhaps you could post back with anything you discover?

Thanks,

Stewart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top