text input matching label question
Thanks for the help
in the textbox, simply implement a keypress event. In your designer view of the form, select the textbox, then in the properties of the textbox, choose the events icon "lightning" symbol and double click the keypress event to create this event handler.
Now in here you will compare the keychar to what the label has, from the arguments (KeyPressEventArgs) in this event.
What will happen is when you press the key in the textbox, it will automatically "fire" or "raise" the event so whatever code has been implemented here would be executed.
so in this event, try perhaps this:
if e.KeyChar.ToString().ToLower().Equals(Me.theLabel.Text) then
'the key pressed matches the text in the label
end if
This will only work successfully, if the text in the label is 1 character.
does this help?