|
-
Jun 18th, 2003, 09:04 AM
#1
Thread Starter
Hyperactive Member
Using Updown with MaskEdBox
Hi,
I've done the same thing you would if you were going to use a textbox with an updown control, but I can't get it to work with a MaskEdBox.
I like the idea of only being able to accept numeric values, but for whatever reason I can't seem to get the updown to work with a MaskEdbox.
Can the two be used together?
Thanks,
JB
JazzBass
In the .NET era
Trying to remember VB6
Progress: 
XP Professional @ Home
and @ the Office
-
Jun 20th, 2003, 09:44 AM
#2
Thread Starter
Hyperactive Member
Any Help?
Does anyone know?
Thanks,
JB
JazzBass
In the .NET era
Trying to remember VB6
Progress: 
XP Professional @ Home
and @ the Office
-
Jun 20th, 2003, 12:41 PM
#3
Fanatic Member
I am not sure what you are talking about when you mention the up down thing, but if it works with a regular text box and not a mask edit control then you can simply filter out all characters besides numeric values in the Key_Press event for the text box.
Example
Private Sub txtbox_KeyPress(KeyAscii As Integer)
Dim Char As String
Char = Chr$(KeyAscii)
If KeyAscii <> 8 And KeyAscii <> 13 Then
If IsNumeric(Char) = False Then
KeyAscii = 0
End If
End If
End Sub
-
Jun 24th, 2003, 10:51 AM
#4
Thread Starter
Hyperactive Member
Thanks
Thank you very much.
Looks like I'll have to go that route.
JB
JazzBass
In the .NET era
Trying to remember VB6
Progress: 
XP Professional @ Home
and @ the Office
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|