![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 陳奕道 ![]()
![]() |
移動方式是9個點 點對點的點擊移動 我是用9個button 想請問的是要怎麼限制button的點擊 我現在相鄰的Button中間有牆壁 點擊有會跑過去 甚至跨兩格點擊也會動 想要做到一格一格移動 遇到牆壁會無法動 還有一個問題是Button的 Focus有辦法改成 初始是在右下角的button嗎 我現在都是預設左上角開始 感謝回答
搜尋相關Tags的文章:
[ window form button ] ,
本篇文章發表於2020-04-27 14:38 |
1樓 |
給你一個方向
用 button.loaction 去做限制 private void button1_Click(object sender, EventArgs e) { int btnx = button2 .Location.X; int btny = button2.Location.Y; button2.Location = new Point(btnx + 1, btny + 1); }
本篇文章回覆於2020-11-07 17:56
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
2樓 |
在屬性視窗有座標位置,可以直接變更座標位置
或透過程式去影響他變更位置
本篇文章回覆於2021-01-07 11:27
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
回覆 |
如要回應,請先登入. |