removing number from textbox..help needed

kogan31

Newcomer
Joined
Oct 6, 2003
Messages
11
hi guys!!

i did a coding to generate numbers from 1-9 in a textbox
and i did the coding to display the number when i press T or D in a label.

now i need the coding so that the number that generates out randomly will be removed when i press the space bar according to the number i chose with my T or D key ..and the number that is removed will be counted as a point and will be displayed on a label and will accumulate until i stop the game..

Private Sub Form1_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Dim schar As Char
Dim pos As Integer
schar = CStr(pos)
pos = Label1.Text.IndexOf(schar)
If e.KeyCode = Keys.Space Then
Label1.Text = Label1.Text.Remove(pos, 1)
End If

this is what i did but it cant work..and i cant show the score on the label
any advice?
 
Back
Top