Focus

giovedì 04 giugno 2015 - 12.28
Tag Elenco Tags  C#  |  .NET 4.0  |  Windows 7  |  Visual Studio 2010  |  SQL Server 2008 R2

iif Profilo | Expert

Ciao a tutti, ho un form che deve trasferire il focus ad una griglia alla pressione di un testo funzione.
Premendo il tasto funzione sposta il focus sul menu in alto a sinistra.
Posto il codice:
private void txtNote_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F5) rbEOK.Checked = true; else if (e.KeyCode == Keys.F6) rbEKO.Checked = true; else if (e.KeyCode == Keys.F7) rbROK.Checked = true; else if (e.KeyCode == Keys.F8) rbRKO.Checked = true; else if (e.KeyCode == Keys.F10) { QuantiValidati++; if (rbEOK.Checked || rbEKO.Checked || rbROK.Checked || rbRKO.Checked) SalvaRiga(); } Griglia.Focus(); }

Sbaglio qualcosa?
Grazie.
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5