Search the Community
Showing results for tags 'pictureBox hareket ettirme'.
-
Merhaba. http://prntscr.com/6sxau4 Resimde de görüldüğü gibi Form'da ki pictureBox'ı yukarı, aşağı, sol ve sağa doğru hareket ettirmek istiyorum. Location özelliğini kullanarak pictureBox'ı sağ ve sola hareket ettirebiliyorum onda sıkıntı yok. Ama Location özelliği ile yukarı ve aşağı olmuyor. Araştırıyorum Left ve Right metodlarını kullanamadım bir türlü. Location'lu olan kodlarım bunlar bunlarda herhangi bir sıkıntı yok. private void Form1_KeyDown(object sender, KeyEventArgs e) { int xKonumu = pictureBox1.Location.X; int yKonumu = pictureBox1.Location.Y; if (e.KeyCode == Keys.Right) pictureBox1.Location = new Point(xKonumu + 1, yKonumu); else if (e.KeyCode == Keys.Left) pictureBox1.Location = new Point(xKonumu - 1, yKonumu); } if(e.KeyCode == Keys.Right) pictureBox1.Right +=1; yapıyorum olmuyor. Yanlışmı kullanıyorum acaba? sade ve anlaşılır şekilde anlatırsanız sevinirim.