[Gambas-user] Hello all :D Can anybody tell me how i can make a...

2009-05-07 Thread vlahonick vlahonick
Hello all :D Can anybody tell me how i can make a value to calculate something only if the user put specific numbers? EXAMPLE: Dim S As String Dim i, y, N, d As Integer S = TextBox1.Text y = Len(S) N = 0 For i = 1 To y d = Val(Mid(S,

Re: [Gambas-user] Hello all :D Can anybody tell me how i can make a...

2009-05-07 Thread Jesus Guardon
Hi Vlahonick You must use keycode in the keypress event to allow only selected ascii codes to be entered in your textbox: PUBLIC SUB TextBox2_KeyPress() SELECT CASE Key.Code CASE 48 TO 49 'for 1 and 0 'following cases are for allowing delete, tab, etc CASE