Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old January 23rd, 2013, 11:43 AM
Authorized User
Points: 406, Level: 7
Points: 406, Level: 7 Points: 406, Level: 7 Points: 406, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2005
Location: Florida
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
Reply With Quote
  #12 (permalink)  
Old January 23rd, 2013, 09:33 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,141, Level: 23
Points: 3,141, Level: 23 Points: 3,141, Level: 23 Points: 3,141, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 640
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!)
Reply With Quote
  #13 (permalink)  
Old January 26th, 2013, 01:13 PM
Authorized User
Points: 406, Level: 7
Points: 406, Level: 7 Points: 406, Level: 7 Points: 406, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2005
Location: Florida
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
Reply With Quote
  #14 (permalink)  
Old January 27th, 2013, 10:34 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,141, Level: 23
Points: 3,141, Level: 23 Points: 3,141, Level: 23 Points: 3,141, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 640
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!)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 11:50 AM



All times are GMT -4. The time now is 11:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.