Results 1 to 6 of 6

Thread: current mouseshape?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    86

    current mouseshape?

    Is there a way to tell which mouse shape/cursor is currently active?

    I've been playing around with Cursor.Current but I can't figure it out.
    I don't even know if Cursor.Current is the correct thing to use, although I've spend hours looking on google.

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: current mouseshape?

    You can check the current cursor object against the defaults, but would be trickier if you are using custom ones.

    Code:
    Select Case Me.Cursor
      Case Cursors.Default
      Case Cursors.WaitCursor
      Case Cursors.IBeam
    End Select
    Or the name

    Me.Cursor.ToString returns "[Cursor: WaitCursor]"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    86

    Re: current mouseshape?

    hmm it always seems to return Cursor: Default..
    I altered the coding to Cursor.ToString so that it would work outside my form as well.

    Any idea why it allways returns Cursor: Default ?

  4. #4
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: current mouseshape?

    Have you actually changed the cursor?

    ie Me.Cursor = Cursors.WaitCursor

    or did I not understand your initial meaning of the question and you want to know which mouse pointer is selected anywhere in windows or its colour/scheme?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    86

    Re: current mouseshape?

    yeah I want to know which mouse pointer is selected anywhere in windows

  6. #6
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: current mouseshape?

    May want to make that a bit clearer in your post . I have no idea on that one then, it will change between which application is active and what you are doing, even if you could ask what the current cursor is with polling, if you do not poll quick enough you may get changes that you miss. What is your actual purpose for getting this?

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