Solved

Calling .chm file

Posted on 2001-06-04
3
388 Views
Last Modified: 2011-10-03
I created a .chm file i.e html help file.

i want to invoke it thru VB 6.0

Please let me know how do i do so.

Thanx
0
Comment
Question by:archnaashish
3 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6155012
Hi, try this:

___________________________________________________

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long

Private Function StartDoc(ByVal FileName As String) As Long
    Dim Scr_hDC As Long
    Scr_hDC = GetDesktopWindow()
    'change "Open" to "Explore" to bring up file explorer
    StartDoc = ShellExecute(Scr_hDC, "Open", FileName, "", "C:\", 1)
End Function

Private Sub Command1_Click()
    Dim i As Long
    i = StartDoc("C:\Program Files\Microsoft Visual Studio\MSDN98\98VS\1033\Adodc98.chm")
End Sub

'Hope will help.
0
 
LVL 1

Accepted Solution

by:
venkatg76 earned 50 total points
ID: 6155017
We can do like this,
App.HelpFile = "test.chm"


0
 

Author Comment

by:archnaashish
ID: 6155038
Thanx it did work
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now