Copy link to clipboard
Copied
Hi all:
I was trying to integrate the .net web application with robohelp. I tried calling the helpfile generated using robohelp.
RH_ShowWebHelp
method was used to call .
It internally called
private bool ShowHelpURL(string strURL)
method.
But i am getting an error
WebBrowser m_browser = new WebBrowser();
if (m_browser != null)
{
m_browser.Navigate(strURL);
m_browser.Visible =
true;
return true;
}
return false;
is giving issue because mine is webapplication. the solution they say is add STTHREAD section.
Can anybody guide me in proper direction in integrating the .Net web application with robohelp.
Copy link to clipboard
Copied
Ran into the same issue. Here is the solution I found
protected void btnHelp_Click(object sender, EventArgs e)
{
OrderIt.Common.Utilities.RoboHelpAPI.CSH_API helpApi = new CSH_API();
Thread thread = new Thread(new ThreadStart(STAOparation));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
}
public void STAOparation()
{
RoboHelpAPI.CSH_API helpApi = new CSH_API();
helpApi.RH_ShowLocalHelp(0, "http://localhost:4606/help/WebHelp/index.htm", OptionConstants.CSH_DISPLAY_CONTEXT, "1");
}