Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Clear Web Browser control - HOWTO?
Thread ID: 228552 Message ID: 228566 # Views: 27 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Tuesday, May 19, 2009 10:40:45 PM         
   


> >
> > How about to navigate to "about:blank"?
> > Or create an empty HTML on the fly and navigate browser to it?
> >
> > -----------------
> > Borislav Borissov
> >
> > Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
> > The only thing normal about database guys is their tables.
>
> Bleen!
> So simple, like anything truly genious!
>
> ... except that it ain't working: it still displays that previous doc. Maybe I'm Missing something? Here's the code (and - yes, Blank.HTM does exist):
>
>
THISFORM.oleBrowser.Navigate("h:\sharedsource\blank.htm")
> 
> LOCAL lcFile
> 
> lcFile = C_FILES.c_Dir + C_FILES.c_File
> 
> THISFORM.oleBrowser.Navigate(lcFile)
> RETURN

>

Boris' "about:blank" suggestion works for me:

PUBLIC oForm as Form
oForm = CREATEOBJECT('TestForm')
oForm.Show()
RETURN

DEFINE CLASS TestForm as Form
	AutoCenter = .T.
	Width = 620
	Height = 460
	
	ADD OBJECT txtUrl as Textbox WITH ;
		Width = 300, Value = 'www.microsoft.com'

	ADD OBJECT cmdNavigate as Commandbutton WITH ;
		Left = 310, Height = 22, Caption = "Go", Default = .T.
	PROCEDURE cmdNavigate.Click
		Thisform.Navigate()
	ENDPROC

	ADD OBJECT cmdClear as Commandbutton WITH ;
		Left = 460, Height = 22, Caption = "Clear"
	PROCEDURE cmdClear.Click
		Thisform.txtUrl.Value = ''
		Thisform.Navigate()
	ENDPROC

	ADD OBJECT Browser as oleControl WITH ;
		Left = 10, Top = 50, Width = 600, Height = 400, ;
		Anchor = 15, OleClass = 'Shell.Explorer'
	PROCEDURE Browser.Refresh
		NODEFAULT
	ENDPROC

	PROCEDURE Navigate
		LOCAL lcURL
		lcURL = EVL(TRIM(Thisform.txtUrl.Value), 'about:blank')
		Thisform.Browser.Navigate(m.lcURL)
	ENDPROC
ENDDEFINE




hth
-Stefan

ENTIRE THREAD

Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/19/2009 9:53:44 PM
RE: Clear Web Browser control - HOWTO? Posted by Borislav Borissov @ 5/19/2009 9:57:02 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/19/2009 10:02:20 PM
RE: Clear Web Browser control - HOWTO? Posted by Stefan Wuebbe @ 5/19/2009 10:40:45 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/19/2009 11:18:40 PM
RE: Clear Web Browser control - HOWTO? Posted by tushar @ 5/20/2009 8:10:27 AM
RE: Clear Web Browser control - HOWTO? Posted by Borislav Borissov @ 5/19/2009 10:57:35 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/20/2009 12:10:46 AM
RE: Clear Web Browser control - HOWTO? Posted by Yuri Rubinov @ 5/19/2009 10:10:01 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/19/2009 10:23:15 PM
RE: Clear Web Browser control - HOWTO? Posted by Yuri Rubinov @ 5/20/2009 3:31:24 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/20/2009 5:15:58 PM
RE: Clear Web Browser control - HOWTO? Posted by Yuri Rubinov @ 5/20/2009 6:10:54 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/20/2009 6:20:19 PM
RE: Clear Web Browser control - HOWTO? Posted by Yuri Rubinov @ 5/20/2009 6:36:22 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/20/2009 7:01:51 PM
RE: Clear Web Browser control - HOWTO? Posted by Yuri Rubinov @ 5/20/2009 8:00:45 PM
RE: Clear Web Browser control - HOWTO? Posted by Ilya Rabyy @ 5/20/2009 8:13:30 PM
RE: Clear Web Browser control - HOWTO? Posted by Bernard Bout @ 5/21/2009 3:03:40 AM
RE: Clear Web Browser control - HOWTO? Posted by tom knauf @ 4/24/2014 10:19:37 AM