using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.None;
this.TopMost = true;
this.Bounds = Screen.PrimaryScreen.Bounds;
}
private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.W)
{
kwadracik.Location = new Point(kwadracik.Location.X + 10, kwadracik.Location.Y + 10);
}
}
}
}
Dlaczego mimo wciskania "W" pozycja kwadracika się nie zmienia. (jako kwadracik można wziąć cokolwiek np. button)