Add a TextClick event for TextBox in your form.
public partial class Form1 : Form
{
public static int count = 0;
public Form1()
{
InitializeComponent();
}
private void textBox1_Click(object sender, EventArgs e)
{
count++;
this.label1.Text = count.ToString(); ;
}
}
VB:
Public Partial Class Form1
Inherits Form
Public Shared count As Integer = 0
Public Sub New()
InitializeComponent()
End Sub
Private Sub textBox1_Click(sender As Object, e As EventArgs)
count += 1
Me.label1.Text = count.ToString()
End Sub
End Class
Thank You.