Ouverture d'un fichier hlp sous Access
Philippe
-
xenon -
xenon -
Bonjour,
Je recherche un bout de code VBA pour ouvrir un fichier hlp via une procédure évènementielle.
J'ai crée MonFichier.hlp (lu avec Winhlp32.exe). Et je veux ouvrir ce fichier ... depuis mon application Access... c'est tout... et j'y arrive pô.
Merci de vos lumières.
Je recherche un bout de code VBA pour ouvrir un fichier hlp via une procédure évènementielle.
J'ai crée MonFichier.hlp (lu avec Winhlp32.exe). Et je veux ouvrir ce fichier ... depuis mon application Access... c'est tout... et j'y arrive pô.
Merci de vos lumières.
A voir également:
- Ouverture d'un fichier hlp sous Access
- Fichier bin - Guide
- Comment ouvrir un fichier epub ? - Guide
- Comment réduire la taille d'un fichier - Guide
- Fichier rar - Guide
- Fichier .dat - Guide
1 réponse
---------------------------------------------------------------------
'GLOBAL DECLARATION SECTION
'---------------------------------------------------------------------
'The following two lines must be entered into a single line in your Visual
'Basic module.
Public Declare Function WinHelp% Lib "USER" (ByVal hwnd As Integer, _
ByVal HelpFile$, ByVal wCommand As Integer, ByVal dwData As Any)
'Predefined Help Constants
Const HELP_CONTEXT = &h1 'Display topic in ulTopic
Const HELP_QUIT = &h2 'Terminate help
Const HELP_INDEX = &h3 'Display index
Const HELP_CONTENTS = &h3 'Display Contents for help
Const HELP_HELPONHELP = &h4 'Display help on using help
Const HELP_SETINDEX = &h5 'Set the current Index for multiindex help
Const HELP_SETCONTENTS = &h5 'Set the Contents for help
Const HELP_CONTEXTPOPUP = &h8 'Display index in popup window
Const HELP_FORCEFILE = &h9 'Ensure that help displays correct file
Const HELP_KEY = &h101 'Display topic for keyword in dwData
Const HELP_COMMAND = &h102 'Execute a Winhelp macro
Const HELP_PARTIALKEY = &h105 'Call the Windows help search engine
Const HELP_FINDER = &hB 'Display the help topics dialog box
'----------------------------------------------------------------------
'SHOWHELPTOPIC PROCEDURE
'Displays Help for a particular topic identified by a context number
'that has been defined in the [MAP] section of the .HPJ file.
'dwData is an unsigned long integer containing the context number
'for the topic.
'----------------------------------------------------------------------
Sub ShowHelpTopic()
Dim ContextID As Long
ContextID = 2697
WinHelp 0, "c:\excel\macrofun.hlp", HELP_CONTEXT, ContextID
End Sub
'----------------------------------------------------------------------
'HELPONHELP PROCEDURE
'Displays the Contents topic of the designated Using Help file.
'dwData is ignored and should be set to zero length
'----------------------------------------------------------------------
Sub HelponHelp()
WinHelp 0, "c:\excel\macrofun.hlp", HELP_HELPONHELP, ""
End Sub
'----------------------------------------------------------------------
'KEYWORDSEARCH PROCEDURE
'Displays the topic found in the keyword list that matches the keyword
'passed in the dwData parameter if there is one exact match. If there
'is more than one match, displays the Search dialog box with the topics
'listed in the Go To list box. If there is no match, displays the search
'dialog box.
'dwData is a string that contains a keyword for the desired topic.
'-----------------------------------------------------------------------
Sub KeywordSearch()
WinHelp 0, "c:\excel\macrofun.hlp", HELP_PARTIALKEY, "WHILE-NEXT loops"
End Sub
'-----------------------------------------------------------------------
'HELPCONTENTS PROCEDURE
'Displays the Help contents topic as defined by the Contents option
'in the [OPTIONS] section of the .HPJ file.
'dwData is ignored and should be set to 0 length.
'-----------------------------------------------------------------------
Sub HelpContents()
WinHelp 0, "c:\excel\macrofun.hlp", HELP_CONTENTS, ""
End Sub
'-----------------------------------------------------------------------
'QUITHELP PROCEDURE
'Informs the Help application that Help is no longer needed.
'If no other applications have asked for Help, Windows closes the Help
'application.
'dwData is ignored and should be set to zero length.
'-----------------------------------------------------------------------
Sub QuitHelp()
WinHelp 0, "c:\excel\macrofun.hlp", HELP_CONTENTS, ""
WinHelp 0, "c:\excel\macrofun.hlp", HELP_QUIT, ""
End Sub
'-----------------------------------------------------------------------
'RUNHELPMACRO PROCEDURE
'Executes a Help macro.
'dwdata is a string that contains a Help macro to be executed.
'-----------------------------------------------------------------------
Sub RunHelpMacro()
WinHelp 0, "c:\excel\macrofun.hlp", HELP_CONTENTS, ""
WinHelp 0, "c:\excel\macrofun.hlp", HELP_COMMAND, "CopyDialog()"
End Sub
Retour au début
'