我想通過鼠標在DrawingArea中繪製圖像。我可以在DrawingArea中知道當前的鼠標座標,但我怎麼知道按下了什麼按鈕?我當前的代碼看起來像:DrawingArea的MouseButton的狀態
protected void OnPaintedPicture1DrawingareaMotionNotifyEvent (object o, MotionNotifyEventArgs args)
{
EventMotion currentEventMotion = (args.Args[0] as EventMotion);
matchingPercentageForPicture1AndSample1_entry.Text+=String.Format("x='{0}'; y='{1}';\t", currentEventMotion.X, currentEventMotion.Y);
}
我認爲它的lParam變量,你可以正常使用鼠標狀態,但沒有得到任何證據支持這一點.. – Sayse