Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 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: 228602 # Views: 24 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Wednesday, May 20, 2009 8:10:27 AM         
   


> >
> > 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
>
> "There's something rotten in the Danish kingdom!"
> When I run this code
>
>
LOCAL lcFile
> 
> lcFile = C_FILES.c_Dir + C_FILES.c_File
> 
> ** SET STEP ON
> 
> WITH THISFORM.oleBrowser
>    .Navigate("about:blank")
>    .Refresh()
>    .Navigate(lcFile)
>    .Refresh()
> ENDWITH
> RETURN
with SET STEP ON - it works as it supposed to; however, when I comment SET STEP ON out - it does not switch to that blank page...
>
> Any ideas?
>
> Regards,
>
> Ilya

I think after the navigate to blank page, you should wait for the status to change to not busy before navigating to lcFile.

Regards
Tushar

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