PDA

View Full Version : IF you know C# I need you right now...



MR. SLiK
02-19-2003, 03:49 AM
Alright I REALLY need help on something in C-Sharp. Im making this game for a project in my computer class and I chose to use C-Sharp. Now what I want to do is this: When the user press an arrow key (left, right, etc.) I want it to move a corresponding image on my forum. Now I have event handlers and I already have the basic setup for it. For Example

this.KeyUp += new KeyEventHandler(ArrowKeyLeft);
//When "Start" button is clicked these are the corresponding events
private void start_Click(object sender, System.EventArgs e)
{
void ArrowKeyLeft(object sender, KeyEventArgs key)
{
if(key.KeyCode==Keys.Left)
{
...
Move image left. (Need real code here)
}
}
}
I have looked for tutorials everywhere and i cant seem to find this!

OUTLAWS The Machine
02-19-2003, 03:53 AM
:WTF:

MR. SLiK
02-19-2003, 04:10 AM
Im going crazy I cant find one single tutorial that has this!

MR. SLiK
02-19-2003, 05:16 AM
argh ill never figure this out... might as well just present what i got. I have all the event handlers, etc. but I dont know how to move the damn image when the key is pressed!