Re: VC++ key down event help
You have posted to the wrong Forum. This is a "Visual C++ Programming" Forum, not a CLI and so on one...
Re: VC++ key down event help
1 Attachment(s)
Re: VC++ key down event help
This works very well for me:
Code:
System::Void Form1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e)
{
switch(e->KeyCode)
{
case Keys::Right:
pictureBox1->Left += 5;
break;
case Keys::Left:
pictureBox1->Left -= 5;
break;
case Keys::Up:
pictureBox1->Top -= 5;
break;
case Keys::Down:
pictureBox1->Top += 5;
break;
}
}
See the attached project.
Re: VC++ key down event help
mmm strange i did that 1st excatly how u had it and it dident work :S, mm urs works on my computer soo maybe my project has somthing wrong with it ty i guess i did know how to do it >.< stupid thing lol
Re: VC++ key down event help
Quote:
Originally Posted by
RAPIST
...
Does your nickname mean something in some language (other than English)?
Very strange choice…
Re: VC++ key down event help
lol nah mate just a name i use in games so i use it in fourms as well
Re: VC++ key down event help
hi,
move a picturebox in VC++ with my arrow keys i know its keydown event i want to use and well i cant seem to get it working ive tried alot all i can think of that is
this is pretty much what i have its basically what ive been playing with
regards,
phe9oxis,
http://www.guidebuddha.com