I have added .chm help file in C# application and able to open. I would like to close the opened file from program but not getting. Got multiple answers to open the .chm but not for close.
Edit 1: I am not using WPF or WinForm. I am adding it to the SolidWorks add-in application. Added the reference for windows form. Here is my code for open .chm
public void Help()
{
string helpFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), @" TestFolder\Help.chm");
var file = new FileInfo(helpFilePath);
if (!IsFileinUse(file))
{
System.Windows.Forms.Help.ShowHelp(null, helpFilePath);
}
}