Display a web page (automatically) without any navigation ctls. How to disable navigation ctls built into individual WEB PAGES?

I have an xl-based system for 'clipping bits' of web pages to create images.
To avoid copyright issues, I must be certain of the url of each image that is 'clipped'.

Currently -  I pre-identify the url and call it:
    Set oIE = CreateObject("InternetExplorer.application") (or via google)
    oIE.Visible = True
    oIE.navigate ("http://bbc.co.uk")
    oIE.Visible = True
    oIE.AddressBar = 0
    oIE.StatusBar = 0
    oIE.Toolbar = 0
    oIE.MenuBar = 0

Then make snapshot to get the graphic:
    Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
- then crop it.

QUESTION:
Although I suppress the oIE. 'bars' (code above), I cant disable any navigation tools that are built into the WEB PAGE from being used to navigate to other pages.

Is there a way of disabling navigation tools that are built into individual WEB PAGES?


Thanks!
Kelvin
Kelvin4Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fabrice LambertFabrice LambertCommented:
Hi,

What about using a form with a webBrowser object ?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kelvin4Author Commented:
Fabrice:

.... Investigating quality of image (for screenshot)

Thanks!
Kelvin
0
Fabrice LambertFabrice LambertCommented:
Sorry, I do not understand what you mean by "Investigating quality of image (for screenshot)"

Plus, the only legal way to "avoid copyright issues" is to ask the author for permission to use the images.
0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Kelvin4Author Commented:
Fabrice:
Its running. Good quality graphic, thanks.

However, I  need to disable navigation controls within the displayed page.
I must also retain scroll bars functions, so I can read the whole web page.

Can you help with event code to intercept the clicking of navigation controls?

Thanks
Kelvin
0
Kelvin4Author Commented:
Sorry, our msgs crossed.
I just wanted to see what the quality of web images looked like on a UserForm ctl. They look great.

Copyright: agreed. What I'm trying to do is to ensure that the project always saves the url for a 'captured' image, so I can be sure permission is requested, and requested  accurately.

Kelvin
0
Kelvin4Author Commented:
The following code loaded a web url (UserForm_Initialize()) and prevented the clicking of hyperlinks in the resultant web page (WebBrowser1_BeforeNavigate2).

 cancelNavigate (As Boolean) controlled when WebBrowser1_BeforeNavigate2 set Cancel = true, so that cancel = false when the web page was loading.

If readers have improvements I'd be glad to know them. At present List boxes in web pages OPEN, but items cannot be selected when cancelNavigate = true. To close the listBox, simply click the list box Caption a second time.

Option Explicit
Private cancelNavigate As Boolean

Private Sub UserForm_Initialize()
    cancelNavigate = True
    Me.WebBrowser1.Navigate "http://bbc.co.uk"
    cancelNavigate = False
End Sub

Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    If cancelNavigate = False Then
        'MsgBox "Cancel = true"
        Cancel = True
    End If
End Sub
0
Kelvin4Author Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.