|
VB 6 Helper Newsletter
|
Rod Stephens
|
Jun 05, 2009 12:02 PDT
|
Reminder: If you promised to review my book "Beginning Database Design
Solutions," there's no time like the present!
Learn more about the book at:
http://www.vb-helper.com/db_design.htm
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470385499.html
http://www.amazon.com/exec/obidos/ASIN/0470385499/vbhelper/
----------
This week's examples show several different ways to display PDF files in
and out of a form in both VB 6 and VB .NET. Once you know how to do it,
it's actually pretty simple (assuming Adobe Reader is installed on your
computer).
----------
Have a great week and thanks for subscribing!
Rod
RodSte-@vb-helper.com
Books To Keep: http://www.BooksToKeep.com
----------
*** Now Available ***
Beginning Database Design Solutions
http://www.amazon.com/exec/obidos/ASIN/0470385499/vbhelper/
Visual Basic 2008 Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0470182628/vbhelper/
==========
VB6 Contents:
1. New HowTo: Open a PDF file in a WebBrowser control in Visual Basic 6
2. New HowTo: Open a PDF file in an external Adobe Reader process in
Visual Basic 6
3. New HowTo: Open a PDF file in an Adobe Reader control within an
application in Visual Basic 6
Both Contents:
4. New Links
==========
++++++++++
<VB6>
++++++++++
==========
1. New HowTo: Open a PDF file in a WebBrowser control in Visual Basic 6
http://www.vb-helper.com/howto_open_pdf_browser.html
http://www.vb-helper.com/HowTo/howto_open_pdf_browser.zip
Add a WebBrowser control to a form and use its Navigate method to open
the PDF file. It's that easy!
webPdf.Navigate txtFile.Text
==========
2. New HowTo: Open a PDF file in an external Adobe Reader process in
Visual Basic 6
http://www.vb-helper.com/howto_open_pdf_externally.html
http://www.vb-helper.com/HowTo/howto_open_pdf_externally.zip
Use the ShellExecute API function to "execute" the file. If Adobe Reader
is installed, it should open the file.
ShellExecute ByVal 0&, "open", txtFile.Text, _
vbNullString, vbNullString, SW_SHOWMAXIMIZED
==========
3. New HowTo: Open a PDF file in an Adobe Reader control within an
application in Visual Basic 6
http://www.vb-helper.com/howto_open_pdf_reader.html
http://www.vb-helper.com/HowTo/howto_open_pdf_reader.zip
This only works if you have Adobe Reader installed. Then:
1. On the Toolbox, right-click and select Components.
2. Select the "Adobe Acrobat 7.0 Browser Control Type Library 1.0"
and click OK.
3. Add a PDF reader to the form.
Now you can use the reader control's src property to open the PDF file.
pdfReader.src = txtFile.Text
==========
++++++++++
<Both>
++++++++++
==========
4. New Links
http://www.vb-helper.com/links.html
AcademyX Computer Training
http://www.academyX.com
Hands-on classes in VB6, Excel VBA, Access VBA, Java, and more in San
Francisco, Los Angeles, Sacramento, and San Jose locations.
==========
Archives:
http://www.topica.com/lists/VBHelper
http://www.topica.com/lists/VB6Helper
http://www.topica.com/lists/VBNetHelper
Post questions at:
http://www.topica.com/lists/VBHelperQA
|
|
 |
|