im Trying to make a label move when i push The WASD Keys But as i push it pauses i dont know how to fix it so it goes as soon as i push it Heres Code So Far
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 Practice_steerc
{
public partial class Form1 : Form
{
int Xaxis = 5;
int Yaxis = 5;
public Form1()
{
InitializeComponent();
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.W)
{
Yaxis = -5;
}
else if (e.KeyCode == Keys.D)
{
Xaxis = +5;
}
else if (e.KeyCode == Keys.S)
{
Yaxis = +5;
}
else if (e.KeyCode == Keys.A)
{
Xaxis = -5;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
}
}
}