Results 1 to 5 of 5

Thread: [2005] Helpcursor on a ToolStripMenuItem

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Location
    Chennai, INDIA
    Posts
    58

    Exclamation [2005] Helpcursor on a ToolStripMenuItem

    Hi all,


    I have a ToolStripMenu in my application. I would like to change the
    cusor from default to help cursor when i click on a item in the
    ToolStripMenu. I was successfully able to change the cusor, but when
    moved the cursor on certain items, the cursor again changes to default.
    When moved away from such items, cursor changes to help cursor. I later
    found that the help cursor remains unchanged for items which has help
    for those items are enabled.


    So when i move the help cursor to a toolstripmenu item, cursor changes
    to default cursor. I would like to know how to avoid this change in
    cursor when moved to toolstripmenu item as there is no property to
    enable help for a toolstripmenu item.


    I would appreciate your help in this regard.


    Thanks,


    Sugan

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] Helpcursor on a ToolStripMenuItem

    Quote Originally Posted by vsugan_work
    Hi all,


    I have a ToolStripMenu in my application. I would like to change the
    cusor from default to help cursor when i click on a item in the
    ToolStripMenu. I was successfully able to change the cusor, but when
    moved the cursor on certain items, the cursor again changes to default.
    When moved away from such items, cursor changes to help cursor. I later
    found that the help cursor remains unchanged for items which has help
    for those items are enabled.


    So when i move the help cursor to a toolstripmenu item, cursor changes
    to default cursor. I would like to know how to avoid this change in
    cursor when moved to toolstripmenu item as there is no property to
    enable help for a toolstripmenu item.


    I would appreciate your help in this regard.


    Thanks,


    Sugan
    Hi,

    You can change your cursor this way;

    VB Code:
    1. Me.Cursor = Cursors.HelpCursor

    Or

    VB Code:
    1. Me.Cursor = Cursors.Default

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2006
    Location
    Chennai, INDIA
    Posts
    58

    Exclamation Re: [2005] Helpcursor on a ToolStripMenuItem

    Quote Originally Posted by sparrow1
    Hi,

    You can change your cursor this way;

    VB Code:
    1. Me.Cursor = Cursors.HelpCursor

    Or

    VB Code:
    1. Me.Cursor = Cursors.Default

    Wkr,

    sparrow1
    I'm using VB 2005. I used something like this

    Me.cursor = system.windows.forms.curosrs.help

    The problem is mouse pointer gets changed to a help cursor in the above code , but it agains changes to the default pointer when the pointer hovers over items which has not enabled help through help provider component. So i enabled help for all the components. Then mouse pointer remained as help cursor. But ToolStripMenu item does not have any help property. So when the pointer hovers over the menu, it reverts back to the default pointer.

    Thanks,
    Sugan

  4. #4
    Lively Member
    Join Date
    Jan 2006
    Posts
    108

    Re: [2005] Helpcursor on a ToolStripMenuItem

    Try this then...
    VB Code:
    1. Private Sub ToolStrip1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStrip1.MouseHover
    2.         Me.Cursor = Cursors.Help
    3.     End Sub
    VB.Net 2005 Express
    .Net Framework 2.0

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2006
    Location
    Chennai, INDIA
    Posts
    58

    Exclamation Re: [2005] Helpcursor on a ToolStripMenuItem

    Actually i don't want the cursor to be a help cursor all the time. I have a item "Whatis this" in Help Menu. Only after clicking this the cursor has to change to a help cursor. When the user clicks on any item with this cursor, the event handler recognizes the type of cursor. If it is help cursor, it would open up appropriate help. If it is a default cursor it would do the normal functionality.

    Thanks,
    Sugan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width