none
Issue with HelpProvider tooltips under Vista

    Question

  • Hey,

    I wasn't sure which forum to place this in as I am unsure if it is a C#, .NET, or Vista issue.
    I did a multi-forum search before posting but couldn't find anything on this.

    I have a VS2005 C# application under development, I'm using the HelpProvider control to provide tooltip help for various dialog Form controls.
    This is being accomplished using the SetHelpString and SetShowHelp.  The forms have the HelpButton enabled.
    Everything works fine under XP, but on Vista the tooltip is displayed way off on the very left of the screen instead of at the mouse pointer when you help-click on a control.
    The Vista system is Vista Home Premium 64-bit.

    Any ideas?

    Thanks,
    DG

    Friday, January 30, 2009 9:46 PM

Answers

  •  Yes Dr. Green. i will take your medication:) That was apparently a problem. Thanks. i will report later.
    AlexB
    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Monday, February 02, 2009 4:09 PM
  • Good luck with it.
     
    BTW I tested my application on another system that has Vista Business 32-bit and the HelpProvider tooltips works fine.
    So that would mean either a Vista 64 issue or some odd issue with the NVidia video driver perhaps.

    Best,
    DG
    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Tuesday, February 03, 2009 4:29 AM
  • Hi,

    I test it on 64-bit Windows Vista, context-sensitive help messages can be displayed in seemingly random locations.

    You can post it at: https://connect.microsoft.com/VisualStudio/  .

    Thanks and Best regards,
    Harry




    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Friday, February 06, 2009 3:51 AM

All replies

  •  ToolTip should be guided (gently:) to the place you want it to be. First you derermine the left upper corner of the control that is in focus. This is the control you want to help, correct? After that you replace the Location coordinates of your ToolTip with that point plus some reasonable shift up and to the right. It is very easy. Another option is not to bother with control coordiantes and place the ToolTip in close procimity to the Cursor. You can determine the Cursor coordinates as Cursor.Position.X and Y respectively. That will be relative to the screen. Next you will have to move your ToolTip whose coordanates I believe are rerelative to the Form, although I may be mistaken. If they are relative to the Form, recompute them to the screen as ClientToScreen.
    AlexB
    Friday, January 30, 2009 10:08 PM
  • Hi,

    Thanks for the reply.

    I am using the HelpProvider control, not the ToolTip control.
    The HelpProvider control uses the HelpButton in the top-right of a Form to provide context-help for controls on that dialog.
    It does not use an active hover like the ToolTip control does.
    HelpProvider tooltips are activated by clicking on the dialog HelpButton, the mouse cursor changes to a HelpArrow, and then moving over and clicking on a control will display the specified HelpString.  The HelpProvider tooltip should always pop up at the mouse coordinates and there are no properties to override this.
    See HelpProvider.SetShowHelp in the C# online help.

    In the issue I am having, the HelpProvider works fine on XP but not on the Vista system I tested it on.

    Best,
    DG

    Friday, January 30, 2009 10:55 PM
  •  I've never used the class and got very inerested since I've been in need to develop help support. I'l give you a tip and you in turn explain to me more how it works and I appreciate the previous post although it is not enough for me. Run your application in XP SP2 Compatibility mode. RightClick==>Properties==>Compatibility. My questions are: how about the help file the documentation is talking about. I have already copied some code into my app and read pages even before I read your last post. How do I make them? Does HelpProvider serve as a stand alone project that is somehow attached to your main project, perhaps under the solution umbrella or it is included as a cs class. I think the latter is unlikely since there is a main in there. If you can provide more information to cover areas I cannot think of now I would also appreciate it.
    AlexB
    Saturday, January 31, 2009 1:40 AM
  • Hi,

    Thanks.  I had tried Compatibility mode, setting the theme to Classic, etc., with no change on the bug.
    The HelpProvider tooltips always pop up at the screen left instead of at the mouse location.
    I'm going to try the app on a different Vista 32-bit system to see what happens in case it is some issue with .Net x64 on the system.

    I prefer using the HelpProvider over the ToolTip control.
    ToolTip is always popping up when you hover, with HelpProvider the user actually has to choose to get the help tooltip information displayed.

    It's really easy to use, and it can provide tooltip style Help or link to an actual Help File topic etc.
    Drop a HelpProvider control onto your Form.  Make sure the Form property for HelpButton is True, which will add a [?] Help Button to the top-right buttons.
    The Form Controls will get new properties for HelpKeyword, HelpNavigator, HelpString and ShowHelp.
    If all you want is to display tooltip style help when the user clicks on the HelpButton and then on one of the Controls, simply set the HelpString property for the Control to the tooltip string you want, and set ShowHelp to True.
    Personally I prefer setting this in code, in the Constructor or Form_Load event, since this allows you to use string resources either in the Project or in external resource files.
    For example:

    this.helpProvider1.SetHelpString(this.numericUpDownWidth, "Set the width of the image");
    this.helpProvider1.SetShowHelp(this.numericUpDownWidth, true);

    or if using resource strings:


    this.helpProvider1.SetHelpString(this.numericUpDownWidth, Properties.Resources.strhlpWidth);
    this.helpProvider1.SetShowHelp(this.numericUpDownWidth, true);

    And of course in the Project Properties.Resources be sure to add a string resource with a name of strhlpWidth and whatever string text you want.
    If you want the HelpProvider to launch the software's help file when pressing F1 on a Form, see the HelpProvider online help for more information on adding that functionality.  I am not using that feature in my software.  You will require a chm style help file, with the appropriate topic links set up.  As far as I know VS2005 does not include a help file compiler.  There are a number of them available, some of them use MS Word to create the master help file, then compile that into the .chm file that you distribute with your software.

    Hope that helps.

    Best,
    DG
    Saturday, January 31, 2009 3:36 AM
  •  Thanks. It is very helpful. I've missed out on HelpProvider. MS is amazing. Almost daily I still discover major classes that "I should have used long time ago."
    AlexB
    Sunday, February 01, 2009 2:36 AM
  •  OK, I dropped the control, copied your code modifying it to my app and nothing happened:) I mean I don't see a ToolTip. Again, I've got Vista Ultimate x64 and I don't know if this is a problem or not. No ToolTip even at teh corner of the screen. Also I chose for the test an Rtf editor, are they eligible? I will see how it behaves in x86 Vista since I still keep my old machine and it wil be here for another few days.

    Also your second overload with true as the second argument is not recognized by my VS2008. It says there is no such overload and I got a Compile error.
    AlexB
    Sunday, February 01, 2009 2:50 AM
  • I'm using VS2005 .NET 2 so there may be some differences between them.

    I assume that you set the HelpButton property to True on the Form that contains the Controls?
    The way it works is that you click on the [?] HelpButton on the top right corner of the Form (next to the Minimize, Maximize, Close Buttons), then click on a Form Control that you assigned a HelpString and ShowHelp to.  Then the related tooltip will pop up.

    If SetHelpString and SetShowHelp are not the same on VS2008, just look at the Control's Properties list and see what you get for new properties regarding the helpProvider1 that you dropped onto the Form.
    On VS2005, all standard Controls get these new properties related to the HelpProvider:
    "HelpKeyword on helpProvider1"
    "HelpNavigator on helpProvider1"
    "HelpString on helpProvider1"
    "ShowHelp on helpProvider1"

    Setting these properties in code in VS2005 uses a prefix of "Set" eg. SetHelpString.
    If VS2008 has changed the name of any of the HelpProvider class members, the change should be visible in the Control properties.
    Or you may have to check the online help for any changes.

    Best
    David

    Monday, February 02, 2009 4:46 AM
  •  Yes Dr. Green. i will take your medication:) That was apparently a problem. Thanks. i will report later.
    AlexB
    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Monday, February 02, 2009 4:09 PM
  • Good luck with it.
     
    BTW I tested my application on another system that has Vista Business 32-bit and the HelpProvider tooltips works fine.
    So that would mean either a Vista 64 issue or some odd issue with the NVidia video driver perhaps.

    Best,
    DG
    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Tuesday, February 03, 2009 4:29 AM
  • Hi,

    I test it on 64-bit Windows Vista, context-sensitive help messages can be displayed in seemingly random locations.

    You can post it at: https://connect.microsoft.com/VisualStudio/  .

    Thanks and Best regards,
    Harry




    • Marked as answer by Harry Zhu Friday, February 06, 2009 3:51 AM
    Friday, February 06, 2009 3:51 AM
  •  Yep, Vista Ult x64 is giving me quite a few such irritations. A very familiar situation.
    AlexB
    Friday, February 06, 2009 12:50 PM