none
How to get mouse position RRS feed

  • Question

  • Hi 

    How i get  current mouse  position to TextBlok.text

    I need a code, a method that will work in uwp (VB)

    example:

    Private Sub Grid_PointerMoved(sender As Object, e As PointerRoutedEventArgs)
            TexttBlock1.Text = Windows.Graphics.Display.DisplayInformation.GetForCurrentView().ScreenHeightInRawPixels

     End Sub

    Sunday, January 12, 2020 10:17 AM

All replies

  • Sunday, January 12, 2020 10:38 AM
  • Here is one idea

    Getting the Mouse Position Relative to a Specific Element


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Sunday, January 12, 2020 11:40 AM
  • Here is one idea

    Getting the Mouse Position Relative to a Specific Element


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Oouu! That's a new one!

    What will they think of next? !

    Sunday, January 12, 2020 12:07 PM
  • how to write it so that TextBlock.text show cursor position
    Sunday, January 12, 2020 12:14 PM
  • Hi marych1979,

    Thank you for posting here.

    According to your description, your issue is more related to UWP. Therefore, I suggest you ask your question in UWP Forums for more help. 

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 14, 2020 7:17 AM