public static string GetHelpFile()
{
string helpFile = "";
string AppPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
if (AppPath.IndexOf("file:\\") >= 0)
AppPath = AppPath.Replace("file:\\", "");
string fullAssemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
string assemblyName = fullAssemblyName.Split('.').GetValue(fullAssemblyName.Split('.').Length - 1).ToString();
if (File.Exists(Path.Combine(System.IO.Directory.GetParent(AppPath).ToString(), "help\\" + assemblyName + ".hlp")))
helpFile = Path.Combine(System.IO.Directory.GetParent(AppPath).ToString(), "help\\" + assemblyName + ".hlp");
else if (File.Exists(Path.Combine(AppPath, "help\\" + assemblyName + ".hlp")))
helpFile = Path.Combine(AppPath, "help\\" + assemblyName + ".hlp");
return helpFile;
}