Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/04/2011, 17:20
Avatar de culd
culd
 
Fecha de Ingreso: noviembre-2003
Mensajes: 959
Antigüedad: 20 años, 6 meses
Puntos: 19
Respuesta: como hacer que X caracter no se pueda borrar?

Espero que te sirve...

Tendrias que depurarlo un poco mas

Código vb:
Ver original
  1. Private Sub Text1_KeyPress(KeyAscii As Integer)
  2. If KeyAscii = 8 Then
  3.     If Text1.SelStart > 0 Then
  4.         If Mid(Text1, Text1.SelStart, 1) = ";" Then
  5.             KeyAscii = 0
  6.         End If
  7.     End If
  8. End If
  9. End Sub