Can't resolve error

  • Thread starter Thread starter Didymus
  • Start date Start date
D

Didymus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

When I run my app in Debug, it works great.

When I deploy it, and then run the app from the start menu, it works
great... except when I click on Help in the Help menu. It should open
a form and display the contents of the help.txt file. I get an error
message:
...Cannot find a part of the path "D:\Program Files\App
Folder\Resources\Help.txt"...
When I click continue on the error message window, the Help form
displays but without the contents of the Help.txt file.

Here is the frmHelp_Load code:

Private Sub frmHelp_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim AllText, LineOfText As String

' Open the Help.rtf file and load it into rtbHelp.

FileOpen(1, "...\Resources\Help.txt", OpenMode.Input)

Do Until EOF(1)

LineOfText = LineInput(1)

AllText = AllText & LineOfText & vbCrLf

Loop

rtbHelp.Text = AllText

FileClose(1)

End Sub


Like I said... the app works great when run in debug mode...

Thanks in advance,

Gary

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBQArvoT8KnwrkurVSEQK+zQCg1x2quJSUCo66wrZu87hN/yOYThYAn2Ee
Z+FcSIpXaeFKjIQff3Hys9T0
=GxNM
-----END PGP SIGNATURE-----
 
Is the file copied down as part of the installation? Have you checked to
see if the file is there on the disk? I assume by deploy you mean that you
created a setup for this app; did you add that file as a content file that
needs to be copied down?

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Josh,

Yes, I created a Setup and I included the file... and it is installed
into "...\Resources\Help.txt", right where it should be!

Thanks,

Gary

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBQBCHuD8KnwrkurVSEQJEfQCg3AzNL3gqGYHOd5/BmpFWxVv2exYAoIIt
nNrMu16v38C4f/YnvhnELr79
=dcT3
-----END PGP SIGNATURE-----
 
Back
Top