Click here to Skip to main content
15,888,968 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generate DataSet Table Code Pin
PIEBALDconsult10-May-11 14:57
mvePIEBALDconsult10-May-11 14:57 
QuestionSet cursor position without firing MouseMove event [modified] Pin
BHillam10-May-11 2:34
BHillam10-May-11 2:34 
AnswerRe: Set cursor position without firing MouseMove event Pin
Shameel10-May-11 3:00
professionalShameel10-May-11 3:00 
GeneralRe: Set cursor position without firing MouseMove event Pin
BHillam10-May-11 3:06
BHillam10-May-11 3:06 
AnswerRe: Set cursor position without firing MouseMove event Pin
Luc Pattyn10-May-11 3:29
sitebuilderLuc Pattyn10-May-11 3:29 
GeneralRe: Set cursor position without firing MouseMove event Pin
BHillam10-May-11 3:58
BHillam10-May-11 3:58 
AnswerRe: Set cursor position without firing MouseMove event Pin
Luc Pattyn10-May-11 4:37
sitebuilderLuc Pattyn10-May-11 4:37 
AnswerRe: Set cursor position without firing MouseMove event [modified] Pin
BHillam10-May-11 5:30
BHillam10-May-11 5:30 
Back to my initial question, I've spotted a few mistakes which are complicating things a little...

The first mistake was updating prevMousePos to the value in currMousePos, and later using that value to update the position of the cursor.

...
//prevMousePos = currMousePos;
currMousePos = e.Location;
...


The second mistake was assuming that the mouse coordinates in the event were relative to the screen. They are relative to the client rect of the control.

...
Cursor.Position = this.panel_RenderWindow.PointToScreen(prevMousePos);
...


Now the cursor's position is reset correctly, however the problem of the recursive MouseMove events still remains - if I remove Cursor.position = prevMousePos, then my application continues to update in the background, however if I don't everything else freezes until I release the right mouse button - including the 3D render window where the user is expecting to see updates to the camera position. The event is definitely not being unsubscribed correctly, though I can't figure out the correct way.

EDIT: I've been googling for hours and this[^] is the only thread I could turn up that dealt with this specific issue, and the answer he get was less than helpful.

modified on Tuesday, May 10, 2011 11:38 AM

GeneralRe: Set cursor position without firing MouseMove event Pin
Mark Salsbery10-May-11 9:59
Mark Salsbery10-May-11 9:59 
GeneralRe: Set cursor position without firing MouseMove event [modified] Pin
BHillam10-May-11 15:06
BHillam10-May-11 15:06 
GeneralRe: Set cursor position without firing MouseMove event Pin
Mark Salsbery10-May-11 16:39
Mark Salsbery10-May-11 16:39 
QuestionWhat is the best way(s) to send strings from java app to .net app? Pin
CodeGust10-May-11 2:21
CodeGust10-May-11 2:21 
AnswerRe: What is the best way(s) to send strings from java app to .net app? Pin
Groulien10-May-11 2:35
Groulien10-May-11 2:35 
GeneralRe: What is the best way(s) to send strings from java app to .net app? Pin
CodeGust10-May-11 3:39
CodeGust10-May-11 3:39 
AnswerRe: What is the best way(s) to send strings from java app to .net app? Pin
Wayne Gaylard10-May-11 2:44
professionalWayne Gaylard10-May-11 2:44 
GeneralRe: What is the best way(s) to send strings from java app to .net app? Pin
CodeGust10-May-11 3:41
CodeGust10-May-11 3:41 
AnswerRe: What is the best way(s) to send strings from java app to .net app? Pin
jschell10-May-11 12:14
jschell10-May-11 12:14 
GeneralRe: What is the best way(s) to send strings from java app to .net app? Pin
CodeGust10-May-11 12:31
CodeGust10-May-11 12:31 
GeneralRe: What is the best way(s) to send strings from java app to .net app? Pin
jschell11-May-11 8:04
jschell11-May-11 8:04 
QuestionWinform validation Pin
arkiboys10-May-11 2:10
arkiboys10-May-11 2:10 
AnswerRe: Winform validation Pin
Rhuros10-May-11 2:50
professionalRhuros10-May-11 2:50 
GeneralRe: Winform validation Pin
arkiboys10-May-11 3:00
arkiboys10-May-11 3:00 
QuestionRe: Winform validation Pin
Pete O'Hanlon10-May-11 3:13
mvePete O'Hanlon10-May-11 3:13 
AnswerRe: Winform validation Pin
arkiboys10-May-11 5:38
arkiboys10-May-11 5:38 
AnswerRe: Winform validation Pin
Shameel10-May-11 2:56
professionalShameel10-May-11 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.