Jump to content

Recommended Posts

Posted

Boas pessoal é o seguinte tenho um textbox e queria que quando ele tivesse la o cursor e carregase na tecla delete ele nao apagasse (ou seja que não fizesse nada)  eu fiz este código mas não funka

If (AscW(e.KeyValue) = 127) Then
            e.Handled = True
End If

fiz isto no evento keydown do textbox

Agradeço toda ajuda possivel

Nota: estou a utilizar o Microsoft Visual Studio .NET 2003

Cumps

Posted

no mesmo evento (KeyDown), exprimenta antes:

If e.KeyCode = Keys.Delete Then
        e.Handled = True
End If

Testado em VB 2005, mas deve funcionar no .NET, se não, tenta algo parecido.

---- EDIT

Lol... tava mesmo a submeter isto quando recebo a mensagem "Aviso - enquanto estava a escrever a sua mensagem, foi enviada uma nova resposta a este tópico. Pode querer rever a sua mensagem." 😉 de qualquer maneira, fica aqui...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.