Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How can I open a chm file?

 

I tried the following:

 

 

  Quote
Dim strFile As String

strFile = Application.StartupPath & "\help.chm"

 

If (System.IO.File.Exists(strFile) = True) Then

System.IO.File.Open(strFile, IO.FileMode.Open

End If

but nothing happened :(

Does anyone knows what am I doing wrong or if there is another way to open this kind of files?

  • Leaders
Posted

you won't actually open the file ( so as to see it ) using File.Open , you need to use Process.Start to do that , eg:

Dim strFile As String
strFile = Application.StartupPath & "\help.chm"

If (System.IO.File.Exists(strFile)) Then
   System.Diagnostics.Process.Start(strFile) '/// launch the chm file to view it.
End If

Posted

No, the file name really is 'HOSTGestaoPontos.chm'.

But now I know what was going on.. It was related to the permissions.. I change some things in file properties, and now it works fine.

 

Thankx a lot for your help ;)

 

For someone who need.. Here is the code:

 

 

  Quote
Dim strFile As String

strFile = Application.StartupPath & "\" & mstrFileName

 

If (System.IO.File.Exists(strFile) = True) Then

System.Diagnostics.Process.Start(strFile)

End If

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...