Re: How do I pan a picturebox???
From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 10/27/04
- Next message: Ken Allen: "Re: Single use of ICON in all forms"
- Previous message: mnlarsen: "DataGrid autosized larger than needed when large font selected."
- In reply to: Paul L: "Re: How do I pan a picturebox???"
- Next in thread: Paul L: "Re: How do I pan a picturebox???"
- Reply: Paul L: "Re: How do I pan a picturebox???"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 27 Oct 2004 08:06:04 -0700
Cursor.Position?
-- Justin Rogers DigiTec Web Consultants, LLC. Blog: http://weblogs.asp.net/justin_rogers "Paul L" <paull2@rogers.com> wrote in message news:sradnTnoc4g6OuLcRVn-jg@rogers.com... > How do you reset the mouse position when the MouseEventArgs X and Y > properties are read-only? > > Paul > > "Justin Rogers" <Justin@games4dotnet.com> wrote in message > news:OIim%23j7uEHA.2684@TK2MSFTNGP12.phx.gbl... >> Technically you can't freeze the location of the mouse since some movement > is >> required >> to register deltas. What you can do is reset the position of the mouse > back to >> it's original >> location after you've examined the deltas and moved your picture box >> accordingly. >> >> Similar techniques are used in video games where every now and then you'll > see >> the problem >> of a mouse cursor actually rendering, but constantly getting reset back to > the >> *origin* in the >> center of the screen. >> >> >> -- >> Justin Rogers >> DigiTec Web Consultants, LLC. >> Blog: http://weblogs.asp.net/justin_rogers >> >> "Paul L" <paull2@rogers.com> wrote in message >> news:zdqdndGJ5qwpF-PcRVn-sQ@rogers.com... >> > I've created a picturebox inside a panel control with autoscroll > enabled. >> > The picturebox is twice the size of the panel so scrollbars are always >> > shown. What I would like to do, is when the user presses the left mouse >> > button and moves the mouse, the mouse cursor stays frozen on screen, but > the >> > image within the picturebox is panned around (the image is not > technically >> > moving, but the location of the picturebox via the autoscrollposition >> > property). >> > >> > Does anyone know how to do this? How do you keep the mouse cursor frozen >> > too? >> > >> > Thanks in advance for any feedback. >> > >> > Paul L. >> > >> > >> >> > >
- Next message: Ken Allen: "Re: Single use of ICON in all forms"
- Previous message: mnlarsen: "DataGrid autosized larger than needed when large font selected."
- In reply to: Paul L: "Re: How do I pan a picturebox???"
- Next in thread: Paul L: "Re: How do I pan a picturebox???"
- Reply: Paul L: "Re: How do I pan a picturebox???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|