Bonjour

Je me tappe la tete sur un probleme incompréhensible

Je cherche a afficher un document Help qui se trouve dans un repertoire dans le repertoire exe

Si je fait un Path.combine du Application.StartupPath avec le Path du document ca ne marche pas

Si je fait un String.Format qui combine le Application.StartupPath avec le Path du document ca marche

Je viens de voir que le Path.Combine elimine la partie racine inutile
Est ce que cela serait l'explication Help.ShowHelp n'accepterait qu'un full path complet ?

Merci de votre aide je vais prendre un nurofen

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
      string hh = Application.StartupPath;
 
    // Ceci ne fonctionne pas
      string helpFile = Path.Combine(hh,@"\help\Mapscope_fr.chm");
    //  Ceci fonctionne
    //  helpFile = string.Format("{0}{1}",hh,@"\help\Mapscope_fr.chm");
 
    // Full Path en dur (fonctionne aussi)
    //  helpFile = @"d:\projets\MapScope.v2\Mapscope\bin\Debug\help\Mapscope_fr.chm";
 
      Help.ShowHelp(this, helpFile, HelpNavigator.TopicId, "103");