key press

  • Thread starter Thread starter bershama
  • Start date Start date
B

bershama

i maid a picturebox and i want when i press "up aroww"
the picturebox comes up so please send me the code for it
(with the default names) ... :-))
 
/** in C#... assuming "this" is a control **/
this.KeyUp += new KeyEventHandler(this.handleKeyUp);

....

private void handleKeyUp(object sender, KeyEventArgs e){
if( e.KeyCode == Keys.Up){
myPictureBox.Visible = true;
}
}

hth

Leon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top