You probably do, unless you are writing a website, and the textbox is hand coded to a Javascript event.
If so, you will have HTML code either like this:
<input type="text" id="fname" onchange="myFunction()">
Or like this
:<input type="text" id="fname">
<script>
document.getElementById("fname").onchange = function() {myFunction()};
...
That's pretty simple to deal with: change "
onchange
" to "
onclick
"
If it's a Windows app, then it's even simpler: highlight the TextBox in the VS designer, and look at the Properties Pane (not the Project "Properties" , it's a separate display pane you can open via the View menu if it isn't displayed already).
It looks something like this:
https://i.stack.imgur.com/qWydN.png[
^]
Click the "Lightning bolt" and it will change from the Properties to the Events:
https://docs.microsoft.com/en-us/visualstudio/ide/media/express_labelclick.png?view=vs-2019[
^]
Double click the
Click
event and it will create a handler for you - you can now call the same code you executed from the
TextChanged
event (or cut'n'paste from your existing handler).