Skip to content

Instantly share code, notes, and snippets.

@abarth500
Created May 30, 2012 02:06
Show Gist options
  • Save abarth500/2832728 to your computer and use it in GitHub Desktop.
Save abarth500/2832728 to your computer and use it in GitHub Desktop.
canvas1_MouseMove
private void canvas1_MouseMove(object sender, MouseEventArgs e)
{
//マウスが青い四角領域(canvas1)上で動く度に呼び出されるメソッド
double x = e.GetPosition(canvas1).X; //canvas1の左上をゼロとした座標
double y = e.GetPosition(canvas1).Y;
// カンマで区切ったマウスのxy座標を送信
sendMessage(x + "," + y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment