I'm trying to move this button in the x axis.. I used the following code.
But nothing happens... But when i try the same thing after putting a textbox, it works. Heres the code.Code:private: System::Void Form1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) { if( e->KeyCode==Keys::Up) { ++x; label1->Text="up "; button1->Location = Point(x, y); }Any ideas?Code:private: System::Void textBox1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) { if( e->KeyCode==Keys::Up) { ++x; label1->Text="up "; button1->Location = Point(x, y); }




Reply With Quote