PDA

View Full Version : سوال: شبیه سازی یک کد



nima_8m
یک شنبه 11 مهر 1389, 22:49 عصر
با سلام به اساتید محترم
این یه کد وبی هستش چطری میتونم معدلش و تو سی شارپ بنویسم

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

صباح فتحی
یک شنبه 11 مهر 1389, 23:04 عصر
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar=='\r')
{

textBox2.Focus();
}

}

صباح فتحی
یک شنبه 11 مهر 1389, 23:13 عصر
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode==Keys.Enter)
{
textBox2.Focus();
}
}