Una alternativa a mostrar el sistema de Ayuda en pantalla en una ventana independiente de tu aplicación es mostrarla en una ventana emergente pequeña, sombreada de su aplicación. Para realizar esto, puedes utilizar la función WinHelp() de API de Windows con su argumento HELP_CONTEXTPOPUP. Este Este artículo te muestra cómo implementar tal sistema de Ayuda.
Para Access 2000, Access 2002 y Access 2003 escribe o copia en el Editor de Visual Basic el código siguiente en la sección Declaraciones:
Declare Function WinHelp Lib “user32″ Alias “WinHelpA” (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
Public Const HELP_CONTEXTPOPUP = &H8&
Anexa el código siguiente en el Editor de Visual Basic:
Function Help32() As Boolean
On Local Error GoTo Help32_Err
Dim Cid As Long, Result As Long
On Error Resume Next
‘Get the HelpContextID of the active control.
‘The error is 2474 if no control is active.
Cid = Screen.ActiveControl.HelpContextId If Cid = 0 Then
‘There is no control context ID, so check the form and get the HelpContextID of the active form.
‘The error is 2475 if no form is active.
Cid = Screen.ActiveForm.HelpContextId
End If
‘If there is a context ID, open the Help file with context.
‘Specify your custom Help file for the second argument.
‘This example used the default help file NWIND9.HLP located in the Office Samples folder.
‘If the NWIND9.HLP is not available, then replace the specified path with a valid Winhelp file, and modify the code and the HelpContextID of the Forms and Controls accordingly.
If Cid > 0 And Cid < 32767 Then
Result = WinHelp(Application.hWndAccessApp, “C:\Program Files\Microsoft Office\Office\Samples\nwind9.hlp”, HELP_CONTEXTPOPUP, Cid)
Help32 = True
End If
Help32_End:
Exit Function
Help32_Err:
MsgBox Err.Description
Resume Help32_End
End Function
Fuente: www.microsoft.com