Wrox Programmer Forums
|
BOOK: Visual Basic 2010 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2010 Programmer's Reference by Rod Stephens; ISBN: 9780470499832
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2010 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2013, 12:43 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default File Locations

Rod:
Thanks for staying with me when i was ready to give up. Here's what the Solution Explorer looks like in my little test project:

Solution 'TestPDFProject'(1 project)
Solution Items
TestPDFProject
My Projecrt
Form1.vb

My code looks like this:

Try
MessageBox.Show("Operations Guide.pdf exists: " & System.IO.File.Exists("Operations Guide.pdf"))
System.Diagnostics.Process.Start("Operations Guide.pdf")
Catch nullreference As NullReferenceException
MsgBox(nullreference.ToString)
End Try

In my first test the reference to the PDF was shown in the top(Solution) section, in the second test it was added to the bottom test. It was not shown in both sections.

The results were the same in both tests, The message box indicate that the file did not exist . The program throws an error before it gets to "Catch".

Thanks again, Rod for trying to help.

Milt
 
Old January 23rd, 2013, 10:33 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Ah ha! That shows the file isn't being installed where the program is.

(Can you go into the directory where the program is being installed and verify that manually? Otherwise it's still possible that the program has changed its default directory so isn't looking in the right place.)

If that's the case, then there's something wrong with the installation. I know you can handle that with an installation package project. I'm not sure how to do it with your current setup.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old January 26th, 2013, 02:13 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default Files Locations

Rod:
Finally GOT IT TO WORK after a lot of frustration. What I did was put the PDF form in a folder in the "ProgramData" file on the C drive, now I have to remember to be sure this is loaded when I make the setup program.

The code I used is:
System.Diagnostics.Process.Start("C:\ProgramData\M y Entertainment _ Collections\OperationGuide.pdf")
Me.StartPosition = FormStartPosition.CenterScreen

I sincerely thank you for the time and effort you spent trying to teach this old amateur programmer.... Makes me glad that I bought your book.

Sincerely,
Milt
 
Old January 27th, 2013, 11:34 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I'm glad you figured it out. Sorry it took so long!
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating Excel FIles from resource Files abinashpatra ASP.NET 1.0 and 1.1 Basics 0 July 28th, 2008 02:07 AM
Cascading forms, form start locations pigparent Visual Basic 2005 Basics 3 June 27th, 2008 10:34 AM
One Location to Many Locations sudipkumar Biztalk 0 April 15th, 2005 08:13 AM
Default file locations selbybrock Excel VBA 0 March 9th, 2004 12:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.