Thread View: be.comp.programming
2 messages
2 total messages
Started by Netghost
Wed, 15 Oct 2003 17:56
numerieke toetsen EN backspace of delete
Author: Netghost
Date: Wed, 15 Oct 2003 17:56
Date: Wed, 15 Oct 2003 17:56
15 lines
1450 bytes
1450 bytes
Hoi... ik heb in n visual basic programma volgende code
Private Sub txtverstrekking1_KeyPress(KeyAscii As Integer)
Dim intdummy As Integer
If keyascii < Asc("0") Or keyascii > Asc("9") Then
keyascii = 0
intdummy = MsgBox("Enkel cijfers ingeven a.u.b.", vbOKOnly + vbInformation,
"Verkeerde ingave")
End If
Natuurlijk werkt nu de backspace ook niet, om te corrigeren. Wat moet ik
hier juist bijplaatsen om deze toets toch te laten werken?
TIA
NG.
Re: numerieke toetsen EN backspace of delete
Author: Cliff Beeckman
Date: Wed, 15 Oct 2003 20:12
Date: Wed, 15 Oct 2003 20:12
15 lines
1416 bytes
1416 bytes
Private Sub txtverstrekking1_KeyPress(KeyAscii As Integer)
Dim intdummy As Integer
' voeg dit toe aan je code:
If KeyAscii = 8 Then Exit Sub
If keyascii < Asc("0") Or keyascii > Asc("9") Then
keyascii = 0
intdummy = MsgBox("Enkel cijfers ingeven a.u.b.", vbOKOnly + vbInformation,
"Verkeerde ingave")
End If
groeten,
cliff beeckman
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads