Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / September 2005

Tip: Looking for answers? Try searching our database.

MousePosition Property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Y - 26 Sep 2005 16:41 GMT
Hi, what is the MousePosition property of System.Windows.Forms.Control?  I
tried reading it but I can't relate the Point values to the real position of
my mouse.

Thanks.
Herfried K. Wagner [MVP] - 27 Sep 2005 01:54 GMT
"Chris Y" <chris@cursespam.com> schrieb:
> Hi, what is the MousePosition property of System.Windows.Forms.Control?  I
> tried reading it but I can't relate the Point values to the real position
> of my mouse.

You may want to use 'Cursor.Position'.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Oliver Sturm - 27 Sep 2005 10:11 GMT
>"Chris Y" <chris@cursespam.com> schrieb:
>>Hi, what is the MousePosition property of System.Windows.Forms.Control?  I
>>  tried reading it but I can't relate the Point values to the real position  of my mouse.
>
>You may want to use 'Cursor.Position'.

How does that differ from the MousePosition property?

               Oliver Sturm
Signature

Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)

Herfried K. Wagner [MVP] - 27 Sep 2005 12:22 GMT
"Oliver Sturm" <oliver@sturmnet.org> schrieb:
>>>Hi, what is the MousePosition property of System.Windows.Forms.Control?
>>>I tried reading it but I can't relate the Point values to the real
[quoted text clipped - 3 lines]
>
> How does that differ from the MousePosition property?

Sorry, it really doesn't differ from 'Control.MousePosition'.  My bad...

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Morten Wennevik - 27 Sep 2005 06:32 GMT
Hi Chris,

If by real position, you mean the mouse position in control coordinates and not screen coordinates, use Control.PointToClient

> Hi, what is the MousePosition property of System.Windows.Forms.Control?  I
> tried reading it but I can't relate the Point values to the real position of
> my mouse.
>
> Thanks.

Signature

Happy coding!
Morten Wennevik [C# MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.