Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Visual Basic 6 - solo numeri in una textbox
Forum - Visual Basic 6 - solo numeri in una textbox - Pagina 2

Pagine: [ 1 2 ] Precedente | Prossimo
Avatar
gantonio (Normal User)
Guru^2


Messaggi: 1532
Iscritto: 09/09/2007

Segnala al moderatore
Postato alle 22:23
Martedì, 18/09/2007
Veramente basta una riga

If InStr("0123456789-+.,", Chr$(KeyAscii)) = 0 Then keyascii=0

nell'evento KeyPress

PM
Avatar
GrG (Member)
Guru^2


Messaggi: 3430
Iscritto: 21/08/2007

Segnala al moderatore
Postato alle 13:11
Mercoledì, 19/09/2007
Grazie a tutti!!

PM
Avatar
fineagles (Normal User)
Newbie


Messaggi: 1
Iscritto: 01/05/2011

Segnala al moderatore
Postato alle 17:13
Domenica, 01/05/2011
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii <> 8 And KeyAscii <> 44 Then
            If KeyAscii > 57 Or KeyAscii < 48 Then
                KeyAscii = 0
            End If
    End If
End Sub

PM
Avatar
GrG (Member)
Guru^2


Messaggi: 3430
Iscritto: 21/08/2007

Segnala al moderatore
Postato alle 21:34
Lunedì, 09/05/2011
topic vecchio, chiudo.

PM
Pagine: [ 1 2 ] Precedente | Prossimo