Results 1 to 2 of 2

Thread: False cursor location on form

  1. #1
    PL_Andrev is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.5
    Join Date
    Oct 2016
    Posts
    2
    Reputation
    0

    False cursor location on form

    Hi,

    Making first steps at GDI and have problem - the location of mouse does not match to currently shown.
    I suppose that problem is also connected with actual resolution (changeable width of menu bar).

    How to correct the result? The true values should be shown near 0,0...


  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,086
    Reputation
    2803
    MousePosition is a screen coordinate, use PointToClient method to translate it.
    How to format posts with code blocks etc - present the problem/post properly

    Visual Studio Community 2017

Bookmarks

Posting Permissions

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