Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15236

VS 2019 short codes to show specific text in textboxes

$
0
0
I have used a simple elseif statement to check when the TextChanged event is fired for my textbox, it checks to see if the text value matches a certain set of characters typed in by the user and replaces it with a longer string..like this

Private Sub txtdirections_TextChanged(sender As Object, e As EventArgs) Handles txtdirections.TextChanged
If txtdirections.Text = "1ttds" Then
txtdirections.Text = "Take one tablet three times each day"
End Sub

My question is, is it possible to use multiple short codes in one textbox, so the user will type "1ttds" first, followed by "prn" which will then add "when required"...So the entire text would read "Take one tablet three times each day when required"

I could use just one longer short code like "1ttdsprn" , but splitting codes makes it more versatile..

thanks for any help

Viewing all articles
Browse latest Browse all 15236

Trending Articles



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