Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Me.Text = e.KeyValue.ToString() End Sub
private void Form1_KeyDown(object sender, KeyEventArgs e) { this.Text = e.KeyValue.ToString(); }
System::Void Form1_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) { this->Text = e->KeyValue.ToString(); }
import clr clr.AddReference("System.Windows.Forms") from System.Windows.Forms import * def form_KeyDown(sender,e): form.Text = e.KeyValue.ToString() form = Form() form.KeyDown += form_KeyDown Application.Run(form)