Hi. This is my another tutorial again in vb 6.0 entitled creating a backspace button. I had already created a tutorial on this in vb.net but it has a different code.
Now, let's start this tutorial!
1. Let's start this tutorial by following the following steps in Microsoft Visual Basic 6.0: Open
Microsoft Visual Basic 6.0, click
Choose Standard EXE, and click
Open.
2. Next, add only one Button named
Command1 and labeled it as "Backspace", and one TextBox named
Text1 for us to have an inputted string. You must design your interface like this:

3. Now put this code for your code module. This code is for Button1_Click as our Backspace Button:
Private Sub Command1_Click()
Text1.SetFocus
'PUT THE CURSOR AT THE END OF THE TEXT
Text1.SelStart = Len(Text1.Text)
'SEND THE KEY
SendKeys ("{BACKSPACE}")
End Sub
Text1.SetFocus - The cursor will focus to the Textbox.
Text1.SelStart = Len(Text1.Text) - Puts the cursor at the end of the inputted text.
SendKeys ("{BACKSPACE}") - Calls or sends the function of the Backspace Key.
SendKeys Method - Sends one or more keystrokes to the active window (as if typed on the keyboard).
Output:
Type any text in the TextBox and click the Backspace Button.

Download the source code and try it! :)
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:
[email protected]
Add and Follow me on Facebook:
https://www.facebook.com/donzzsky
Visit and like my page on Facebook at:
https://www.facebook.com/BermzISware