Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1470

.HLP file loader

$
0
0
There's some issues when loading Help files in windows 10.

I upgraded from windows 7 to 10, and maybe this is where this problem lies. But I saw all over the same questions on the internet how to fix it.

You can convert it, with a lot of trouble and in the end you're just more frustrated than when you started.

Or you can download winhlp32.exe (this file is available in many places on the internet) and open the help files trough it. The problem is, you have to open the exe first, then search for the help file you want to open. (Time consuming and frustrating)

Just a simple program (with Option Explicit (pun intended)). The form will never been seen anyway, as just after the help file was loaded, the Loader end.

...and Sam, I still love my chr$(34)...:D

Here is the complete program. Create a new project, Standard EXE. Copy this code down here and paste it in the coding part of the form. That's it.

So here it is:

Code:

Option Explicit

Private Sub Form_Load()
     
  Dim aD$, aKa$, xX, MP$
     
  If Right$(App.Path, 1) = "\" Then
      MP$ = App.Path
  Else
      MP$ = App.Path + "\"
  End If
 
  If Len(Command) > 4 Then
      If Command = "" Then
        End
      End If
     
      aD$ = Chr$(34)
     
      If Left$(Command, 1) = aD$ Then
        aKa$ = Mid$(Command, 2, Len(Command) - 2)
      Else
        aKa$ = Command
      End If
  Else
      End
  End If
 
  xX = Shell(MP$ + "winhlp32.exe " + aKa$, vbNormalFocus)
 
  End

End Sub

How to activate the program to open .HLP files when double click or right+Click>Open (windows 10):
Compile the above program. Place the winhelp32.exe file in the same folder.
Then:

Right+Click on any .HLP file
Select Open with>
Move to the bottom of your list.
Select always open check box
Select another app on this pc
Select the compiled program you have just grab above
Select OK

Project: Help Loader.zip
Attached Files

Viewing all articles
Browse latest Browse all 1470

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>