Either I am not totally understanding how events work or Delphi Prism has gone mad!!!
I have a winform, mousedown event and mousemove event. Whenever I click the left mouse button only, MouseDown event fires as expected but ALSO MouseMove event fires right after when it is not suppose to.
Here is the piece of code from my winform designer where the methods are assigned to events.
self.ClientSize := new System.Drawing.Size(751, 502);
self.KeyPreview := true;
self.Name := 'Maker';
self.Text := 'Window Maker';
self.Load += new System.EventHandler(@self.Maker_Load);
self.FormClosing += new System.Windows.Forms.FormClosingEventHandler(@self.Maker_FormClosing);
self.Shown += new System.EventHandler(@self.Maker_Shown);
self.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseDoubleClick);
self.MouseDown += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseDown);
self.MouseMove += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseMove);
self.MouseUp += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseUp);
self.Paint += new System.Windows.Forms.PaintEventHandler(@self.Maker_Paint);
self.ObjectPopup.ResumeLayout(false);
self.ResumeLayout(false);
What am I doing wrong? Please, help I am getting frustrated over this, because I have mousemove events in other parts of my program. They work fine. I can't seem to figure out why this perticular mousemove event is acting up.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…