For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > August 2005 > Web Browser control









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Web Browser control
Dib

2005-08-29, 6:55 pm

Hi,

I am using a Web Browser control in my app. VB6 to open a pdf document so
that the user can preview the document.

On my machine Windows 2000 SP 4 works fine, On XP SP 2 it does not work, the
user get a prompt to open or save the file, if click on open the pdf file
is opened outside the program, is there a way to keep it inside the VB form?


Me.pdf1.Navigate "File Path and name"
Thanks
Dib


Ben Amada

2005-08-29, 9:55 pm

Dib wrote:

> Hi,
>
> I am using a Web Browser control in my app. VB6 to open a pdf document so
> that the user can preview the document.
>
> On my machine Windows 2000 SP 4 works fine, On XP SP 2 it does not work,
> the user get a prompt to open or save the file, if click on open the pdf
> file is opened outside the program, is there a way to keep it inside the
> VB form?
>
>
> Me.pdf1.Navigate "File Path and name"
> Thanks
> Dib


On the XP SP2 machine, what happens if you navigate to a PDF file in
Internet Explorer outside of your VB6 app? Do you get prompted to Open/Save
the PDF document? It sounds to me like Acrobat or at least the Acrobat
Reader plug-in is not installed on that machine. I could be wrong though
:)

Ben


Veign

2005-08-29, 9:55 pm

This kinda of behavior has alot to do with how the user has setup IE and
whether IE knows what to do with the file extension. Basically I don't
believe you can change the behavior for just your instance of the web
browser control without affecting standalone IE.

Also, SP2 introduced alot more security enhancements to IE to help prevent
the user from opening an undesirable file.

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--


"Dib" <dNOSPAMshahene@conNOSPAMsoftware.com> wrote in message
news:u63tqJNrFHA.304@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I am using a Web Browser control in my app. VB6 to open a pdf document so
> that the user can preview the document.
>
> On my machine Windows 2000 SP 4 works fine, On XP SP 2 it does not work,

the
> user get a prompt to open or save the file, if click on open the pdf file
> is opened outside the program, is there a way to keep it inside the VB

form?
>
>
> Me.pdf1.Navigate "File Path and name"
> Thanks
> Dib
>
>



dib

2005-08-30, 3:55 am

Ben,

outside the VB 6 app, pdf documents opens fine, but in side the vb6 app,Yes
all of the items you said happens, I have used the pdf.ocx in the App. but
the Acrobat version 7 does not come with the pdf.ocx anymore. That is why I
desided to use thw web control.

Thanks
Dib

"Ben Amada" <ben@REpoMOweVErpick.com> wrote in message
news:%23dAtBQQrFHA.904@tk2msftngp13.phx.gbl...
> Dib wrote:
>
>
> On the XP SP2 machine, what happens if you navigate to a PDF file in
> Internet Explorer outside of your VB6 app? Do you get prompted to
> Open/Save the PDF document? It sounds to me like Acrobat or at least the
> Acrobat Reader plug-in is not installed on that machine. I could be wrong
> though :)
>
> Ben
>



dib

2005-08-30, 3:55 am

Chris,

What do recomend to use to open a PDF file through VB, I used the pdf.ocx in
my app, but when I installed the app on another machine that is using
Acrobat Version 7, I got an error Saying You cannot run PDF file inthe web
browser and version does not come with the pdf.ocx.

Thanks
Dib

"Veign" <NOSPAMinveign@veign.com> wrote in message
news:%23mOZcmQrFHA.3796@TK2MSFTNGP11.phx.gbl...
> This kinda of behavior has alot to do with how the user has setup IE and
> whether IE knows what to do with the file extension. Basically I don't
> believe you can change the behavior for just your instance of the web
> browser control without affecting standalone IE.
>
> Also, SP2 introduced alot more security enhancements to IE to help prevent
> the user from opening an undesirable file.
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
>
>
> "Dib" <dNOSPAMshahene@conNOSPAMsoftware.com> wrote in message
> news:u63tqJNrFHA.304@TK2MSFTNGP11.phx.gbl...
> the
> form?
>
>



Paul Clement

2005-08-30, 6:55 pm

On Mon, 29 Aug 2005 23:49:16 -0400, "dib" <dNOSPAMibs@comcast.net> wrote:

¤ Ben,
¤
¤ outside the VB 6 app, pdf documents opens fine, but in side the vb6 app,Yes
¤ all of the items you said happens, I have used the pdf.ocx in the App. but
¤ the Acrobat version 7 does not come with the pdf.ocx anymore. That is why I
¤ desided to use thw web control.
¤

Does the file open OK from within the IE browser?


Paul
~~~~
Microsoft MVP (Visual Basic)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com