Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Helpfilename 1

Status
Not open for further replies.

isha

MIS
Mar 7, 2002
216
0
0
IN
I have developed a small project using VB and Access database. I have made a help file(.chm) using HTML help workshop. In the project properties i have given the name of helpfilename as C:\diary\diaryhelp.chm and it is working fine on the development PC. But if I make a package and setup it at another PC in any other Drive or Folder such as D:\diary the help file do not runs. Anyone who can help ils welcome.I want to keep the option of setting up the package on any drive or folder open.
 
Hi! there,
from what i could understand is that you have hardcoded the path name. Do not do it that way. Instead refer the filename as App.Path & "\" & "the file name" from your application code.

while making a setup make sure you have this file copied in to your applciation's path. You can do this in one of the wizard slide's where it will ask you where to copy each file you have included. Typically it will have winpath, apppath etc. So select the apppath there so that the file gets copied in the applications path.

hope this will help!

thanks,
netizen
 
Dear Netizen,
I want to know where to hardcode the help file as App.Path & "\" & "the file name" . In the mdiform or anywhere else?

Thanks,
Isha
 
isha If you place/install the help file (.chm) in the same directory as the program as netizen suggests, you do not need to use app.path to refer to your help file. Set the 'help file name' in the project properties tab to the name of your help file (no path) -and that's it.
Alternatively you can install the help file e.g. in the system directory (as some windows components do) and then set the path when you start up your project:
------------------------------------------------
Private Declare Function GetSystemDirectory Lib "kernel32.dll" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Dim SysDir As String, l As Long
SysDir = Space(255)
l = GetSystemDirectory(SysDir, 255)
SysDir = Left$(SysDir, l)
App.HelpFile = SysDir & "\YourHelpFileName.chm"
------------------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top