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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing PDF files in WebBrowser Window

Status
Not open for further replies.

dwhitlow

MIS
Mar 1, 2000
40
US
I need to be able to view PDF files in a WebBrowser window, but I want to control how it is displayed. I have added the Acrobat Control for ActiveX, but I want to stop the WebBrowser control from opening Acrobat and displaying the file. In the WebBrowser1_BeforeNavigate2 sub, I'm checking for ".pdf" in the URL. If it is there, I am setting Pdf1.Visible = True and Pdf1.LoadFile URL. I tried using WebBrowser1.Stop so that it wouldn't continue and show the PDF, but that doesn't work. the reason I want to control showing the PDF is so I can take away the toolbar from the Reader program. I don't want my users to have access to the toolbar, because it allows them to open a new instance of IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top