Re: How do I pan a picturebox???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 10/27/04


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.
>> >
>> >
>>
>>
>
> 


Relevant Pages

  • Re: How do I pan a picturebox???
    ... How do you reset the mouse position when the MouseEventArgs X and Y ... > Similar techniques are used in video games where every now and then you'll ... >> The picturebox is twice the size of the panel so scrollbars are always ... >> Paul L. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Phone Network Setting on Treo 700w
    ... Paul and Dana, ... I received this reply from Verizon. ... Of course a reset does nothing to solve the problem. ... assist you with your question regarding setting your phone System Select ...
    (alt.cellular.verizon)
  • Re: Universal grammar
    ... Paul> This is a software engineers vocabulary. ... Paul> reset and other h/w interrupts. ... Paul> between how a CPU reacts to signals on various interrupt ... Paul> hardware device interrupts cause the CPU interrupt whatever ...
    (sci.lang)
  • RE: Macro to Reset data input form
    ... Many thanks, Paul C. ... Make the reset box a Form Control command button and link it to this macro. ... this leaves me with the Data Input form populated with the last ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Universal grammar
    ... Of course the address of the actual interrupt ... Paul> vector MUST BE HARDWIRED in the CPU. ... While the reset signal is meant for: ...
    (sci.lang)