|
-
Oct 30th, 2007, 02:15 PM
#1
Thread Starter
New Member
[RESOLVED] [2005] Keyboard Backspace Question
I'm making a keyboard on visual basic and i want to know how do a backspace in the simplest way?
Thanks.
-
Oct 30th, 2007, 02:33 PM
#2
Re: [2005] Keyboard Backspace Question
Are you talking about an on-screen keyboard? For only within your application or "system-wide"?
-
Oct 30th, 2007, 02:42 PM
#3
Thread Starter
New Member
Re: [2005] Keyboard Backspace Question
Yea a virtual keyboard to use within the program.
-
Oct 30th, 2007, 03:32 PM
#4
Re: [2005] Keyboard Backspace Question
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 30th, 2007, 03:52 PM
#5
Thread Starter
New Member
Re: [2005] Keyboard Backspace Question
 Originally Posted by RobDog888
Chr(8) is the backspace.
How would i go about using it if the output was a textbox?
-
Oct 30th, 2007, 05:00 PM
#6
Re: [2005] Keyboard Backspace Question
Heres a complete example.
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = "Blah,..."
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Focus()
TextBox1.SelectionStart = TextBox1.Text.Length
SendKeys.Send("{BACKSPACE}")
End Sub
End Class
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 30th, 2007, 05:12 PM
#7
Thread Starter
New Member
Re: [RESOLVED] [2005] Keyboard Backspace Question
Thanks it worked but i dont really understand all thsi focus stuff im quite new to vb.
Is there any easier way to do it? basically just removing the last character inputted?
Thanks
-
Oct 30th, 2007, 05:45 PM
#8
Re: [RESOLVED] [2005] Keyboard Backspace Question
Yes, its all still simple. The focus is needed because sendkeys send the key to the current active windo for input. So to insure the textbox is focused for input se set focus to it.
You can do similar with the keypress/keydown events and manipulations but is more code.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|