For Win32 application, you can use API function ShellExecute to launch a CHM file.

Example(delphi):

uses SHELLAPI;

ShellExecute(Application.Handle,'open', PChar('hh.exe'),PChar('filename.chm'), nil, SW_SHOW);

Example(VB):

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 Sub Command2_Click()
    ShellExecute 0, "open", "hh.exe", App.Path + "\filename.chm", "", 1
End Sub

For .NET application, you can use Help.ShowHelp to launch a CHM file.

Example(C#):

private void button1_Click(object sender, System.EventArgs e)
  {
  Help.ShowHelp(this, "filename.chm");
  }