Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/08/2009, 10:16
Avatar de eduardo2009
eduardo2009
 
Fecha de Ingreso: agosto-2009
Mensajes: 110
Antigüedad: 14 años, 10 meses
Puntos: 0
Contar renglones en textbox

Que onda, pues aqui ando con un problemita tengo este codigo que encontre por el foro donde me permite contar los enter que le doy a un textbox multiliena pero quisiera saber si alguien me podria orientar para que asi como me cuenta al momento de usuar la teclar de eliminar me vaya restando los renglones

este el codigo q encontre:

Código:
Private Sub Text2_KeyPress(KeyAscii As Integer)
Dim iLineas As Integer
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then
    iLineas = SendMessage(Text2.hWnd, EM_GETLINECOUNT, 0&, ByVal 0&)
    Label1.Caption = " " & SendMessage(Text2.hWnd, EM_GETLINECOUNT, 0&, ByVal 0&) '

If Label1.Caption > 12 Then Label2.Caption = "2/2"
If Label1.Caption > 25 Then Label2.Caption = "3/3"
If Label1.Caption > 38 Then Label2.Caption = "4/4"
End If
End Sub
Gracias