Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21185

Click on a textbox and clear it's contents.

$
0
0
Hi everyone. I am working on a student program, and basically I have a textbox called Text1 that says CLICK HERE TO ENTER ANSWER, but when the student clicks on it, I would like to clear the contents of the box.

I have googled it, and found code to erase it in VB.Net, but was wondering if anyone knew how to do the same, but in VB6?

Here is the VB.net code I found.

Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown
TextBox1.Text = ""
End Sub

I know there is a MouseDown event, but the "handles"?

:) Thanks a lot!

Viewing all articles
Browse latest Browse all 21185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>