Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Wed, 19 Oct 2005 16:26:36 GMT,    group: microsoft.public.vstudio.helpauthoring        back       


Help link to redirection to new topic   
Hello,

I am having some problems launching the online help through .NET. (Windows 
app in C#) When I use the following call

Help.ShowHelp( this, "http://www.mysite/myhelp.htm", HelpNavigator.Topic, 
"contactUs.htm" )

If the help is not open yet the link works perfectly. However, if the help 
is opened then it doesn't redirect to the topic the same way it would in a 
..chm file. Does anyone know why this is or more importantly, a way I can 
make it redirect to the new topic?

Thanks for any help you can give.

Cam
date: Wed, 19 Oct 2005 16:26:36 GMT   author:   Cam Schwieder

Re: Help link to redirection to new topic   
Hello Cam,

> I am having some problems launching the online help through .NET. (Windows 
> app in C#) When I use the following call
>
> Help.ShowHelp( this, "http://www.mysite/myhelp.htm", HelpNavigator.Topic, 
> "contactUs.htm" )
>
> If the help is not open yet the link works perfectly. However, if the help 
> is opened then it doesn't redirect to the topic the same way it would in a 
> .chm file. Does anyone know why this is or more importantly, a way I can 
> make it redirect to the new topic?

I'm not quite sure what you are meaning with "if the help is opened then it 
doesn't redirect to the topic the same way it would in a chm file". I think 
you try to open a browser window with your topic on a server. So I can't see 
how this works for you (see below). BTW calling help isn't documented well 
for Visual Studio.net.I don't use C# but VB.net 2003.

Example (Watch for word wrap; this should all be on one line.):
Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
HelpNavigator.Topic)
Help.ShowHelp(Me, 
"http://www.help-info.de/download/CHM_example/HTMLHelp_Examples/jump_to_anchor.htm", 
HelpNavigator.Topic, "AnchorSample")

Note that the second example line makes following URL with a anchor and the 
example files are real files on the web. So you can try!
http://www.help-info.de/download/CHM_example/HTMLHelp_Examples/jump_to_anchor.htm#AnchorSample

This is not documented. Normally the fourth parameter is used for a context 
ID but this is not working. There is a workaround and see following 
translated  code:

private void mnuHelpShowHelp_Click(object sender, System.EventArgs e) {
        // --- This works very slow and had never worked before
        // --- workaround through Ken COX [MVP] &HF = 15 = HH_HELP_CONTEXT
        // --- fix will come in .NET 2.0 through new value 
HelpNavigator.TopicId
        // --- This works only with Option Strict OFF !!
        // --- updated 2004-12-08 -----------------------------------
        int iContextID;
        iContextID = 10010;
        Help.ShowHelp(this, this.hlpProvider1.HelpNamespace, 15, 
iContextID);
    }

What does this mean? Throw away your last parameter, because it can't be a 
HTML filename!
Help.ShowHelp( this, "http://www.mysite.com/myhelp.htm", 
HelpNavigator.Topic)

Further information:
http://www.help-info.de/en/Visual_Basic_net/vbnet.htm
http://www.help-info.de/en/Visual_Basic_net/vbnet_htmlhelp.htm#PropertyHtmlServer

VB.net example download (.NET 1.1 required, start exe from /bin)
http://www.help-info.de/download/vb2003netchm.zip

HTH
Best regards
Ulrich Kulle
*****************************
http://www.help-info.de
info##@help-info.de
Remove ##
*****************************
date: Wed, 19 Oct 2005 20:47:39 +0200   author:   Ulrich Kulle infoREMOVE##

Re: Help link to redirection to new topic   
Thanks for the response Ulrich!

I just took a look at you examples and have noticed the difference. You are 
either displaying the left hand pane (Content, Index, Search) and the 
default topic or you link directly to the topic. If you run one of the two 
lines of code below you'll see the linking that I am trying to get.

Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
HelpNavigator.Topic, "Help_Info_AP_Help/ap_help_info.htm");

Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
HelpNavigator.Topic, "Help_Info_AP_Help/docbook.htm");

If you run the first one (which would open the help into IE) it will link to 
the "AP Help - Aktuelle Entwicklung" topic. Then if you run the second one 
it simply refresh's IE on that topic. However, if you close the IE windows, 
and then run the second one it will open IE and link to the "DocBook und 
HTMLHelp" document.

Also, I have tried the work around provided by Ken Cox, but unfortunatly as 
you said, it only works with the Strict option turned off and doing that is 
something that I would prefer not to do.

Thanks,

Cam

"Ulrich Kulle" <infoREMOVE##THIS@help-info.de> wrote in message 
news:eYld92N1FHA.3892@TK2MSFTNGP12.phx.gbl...
> Hello Cam,
>
>> I am having some problems launching the online help through .NET. 
>> (Windows app in C#) When I use the following call
>>
>> Help.ShowHelp( this, "http://www.mysite/myhelp.htm", HelpNavigator.Topic, 
>> "contactUs.htm" )
>>
>> If the help is not open yet the link works perfectly. However, if the 
>> help is opened then it doesn't redirect to the topic the same way it 
>> would in a .chm file. Does anyone know why this is or more importantly, a 
>> way I can make it redirect to the new topic?
>
> I'm not quite sure what you are meaning with "if the help is opened then 
> it doesn't redirect to the topic the same way it would in a chm file". I 
> think you try to open a browser window with your topic on a server. So I 
> can't see how this works for you (see below). BTW calling help isn't 
> documented well for Visual Studio.net.I don't use C# but VB.net 2003.
>
> Example (Watch for word wrap; this should all be on one line.):
> Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
> HelpNavigator.Topic)
> Help.ShowHelp(Me, 
> "http://www.help-info.de/download/CHM_example/HTMLHelp_Examples/jump_to_anchor.htm", 
> HelpNavigator.Topic, "AnchorSample")
>
> Note that the second example line makes following URL with a anchor and 
> the example files are real files on the web. So you can try!
> http://www.help-info.de/download/CHM_example/HTMLHelp_Examples/jump_to_anchor.htm#AnchorSample
>
> This is not documented. Normally the fourth parameter is used for a 
> context ID but this is not working. There is a workaround and see 
> following translated  code:
>
> private void mnuHelpShowHelp_Click(object sender, System.EventArgs e) {
>        // --- This works very slow and had never worked before
>        // --- workaround through Ken COX [MVP] &HF = 15 = HH_HELP_CONTEXT
>        // --- fix will come in .NET 2.0 through new value 
> HelpNavigator.TopicId
>        // --- This works only with Option Strict OFF !!
>        // --- updated 2004-12-08 -----------------------------------
>        int iContextID;
>        iContextID = 10010;
>        Help.ShowHelp(this, this.hlpProvider1.HelpNamespace, 15, 
> iContextID);
>    }
>
> What does this mean? Throw away your last parameter, because it can't be a 
> HTML filename!
> Help.ShowHelp( this, "http://www.mysite.com/myhelp.htm", 
> HelpNavigator.Topic)
>
> Further information:
> http://www.help-info.de/en/Visual_Basic_net/vbnet.htm
> http://www.help-info.de/en/Visual_Basic_net/vbnet_htmlhelp.htm#PropertyHtmlServer
>
> VB.net example download (.NET 1.1 required, start exe from /bin)
> http://www.help-info.de/download/vb2003netchm.zip
>
> HTH
> Best regards
> Ulrich Kulle
> *****************************
> http://www.help-info.de
> info##@help-info.de
> Remove ##
> *****************************
>
>
date: Wed, 19 Oct 2005 19:41:20 GMT   author:   Cam Schwieder

Re: Help link to redirection to new topic   
Hello Cam,

> I just took a look at you examples and have noticed the difference. You 
> are either displaying the left hand pane (Content, Index, Search) and the 
> default topic or you link directly to the topic. If you run one of the two 
> lines of code below you'll see the linking that I am trying to get.
>
> Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
> HelpNavigator.Topic, "Help_Info_AP_Help/ap_help_info.htm");
>
> Help.ShowHelp(Me, "http://www.help-info.de/de/h_start.htm", 
> HelpNavigator.Topic, "Help_Info_AP_Help/docbook.htm");
>
> If you run the first one (which would open the help into IE) it will link 
> to the "AP Help - Aktuelle Entwicklung" topic. Then if you run the second 
> one it simply refresh's IE on that topic. However, if you close the IE 
> windows, and then run the second one it will open IE and link to the 
> "DocBook und HTMLHelp" document.
>
> Also, I have tried the work around provided by Ken Cox, but unfortunatly 
> as you said, it only works with the Strict option turned off and doing 
> that is something that I would prefer not to do.

I put your code lines (1 and 2) to a button event of my VB.net example 
application and now *surprised* that the first code line is working! I think 
the fourth parameter is for special use only (see below) and FRAMESETs are 
not planned for use with Help.Showhelp - but nice to know and see ..

My last post pointed to the anchor parameter. Note that the first code line 
makes following URL and as you said it's working only one time:
http://www.help-info.de/de/h_start.htm#Help_Info_AP_Help/ap_help_info.htm

The fourth parameter isn't documented well so nobody knows what to use. 
AFAIK you only can use your kind of code with compiled CHM files (see code). 
Think in a ZIP file structure for the second and fourth parameter of 
following line but this is not working over http!
Help.ShowHelp(Me, sPath & "/hlp/CHM-example.chm", HelpNavigator.Topic, 
"/Garden/flowers.htm")

What you can do?
1. Switch to single HTML files on a server
    '--- Display local HTML file -----
    Help.ShowHelp(Me, sPath & "/hlp/index.htm", HelpNavigator.Topic)
2. Use a fourth parameter only for jumping to a anchor
    '--- Display local HTML file and jump to anchor -----
    '--- The anchors '#' is inserted automatically ------
    Help.ShowHelp(Me, sPath & "/hlp/HTMLHelp_Examples\jump_to_anchor.htm", 
HelpNavigator.Topic, "AnchorSample")

HTH
Best regards
Ulrich Kulle
*****************************
http://www.help-info.de
*****************************
date: Fri, 21 Oct 2005 00:24:25 +0200   author:   Ulrich Kulle infoREMOVE##

Re: Help link to redirection to new topic   
Hello Cam,

> What you can do?
> 1. Switch to single HTML files on a server
>    '--- Display local HTML file -----
>    Help.ShowHelp(Me, sPath & "/hlp/index.htm", HelpNavigator.Topic)
> 2. Use a fourth parameter only for jumping to a anchor
>    '--- Display local HTML file and jump to anchor -----
>    '--- The anchors '#' is inserted automatically ------
>    Help.ShowHelp(Me, sPath & "/hlp/HTMLHelp_Examples\jump_to_anchor.htm", 
> HelpNavigator.Topic, "AnchorSample")

I have to correct me - forget (2.) it. The second solution isn't working. 
Setting an anchor name can only be used for the HelpKeyword property of a 
control! See:
http://www.help-info.de/en/Visual_Basic_net/vbnet_htmlhelp.htm#PropertyHtmlServer

Best Regards
date: Fri, 21 Oct 2005 01:18:23 +0200   author:   Ulrich Kulle infoREMOVE##

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us