Web Development
5 replies
by peyison
You really can't do this because as soon as you press the command button it becomes the active control.
What you could do is use a label, or some control that doesn't receive focus. To do this with a label, enter this code in the click event of the label control:
'--make sure that the active control can receive the null
If TypeOf Form.ActiveControl Is TextBox Then
Form.ActiveControl = null
End If
You can check for other types of controls besides TextBox. This just makes sure thatit won't crash if the active control is a command button, or something like that.
You can turn on the underline property of the label to make it appear more like something the user should click on.
Hope this helps.
by rjsegm
by donq
by rjsegm
by rjsegm
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending