|
-
Mar 5th, 2005, 10:57 AM
#1
Thread Starter
Member
setfocus help needed
i my textbox lostfocus event, i have written a code and at the end of processing of code, the focus should return again to the same textbox.
i am using lostfocus event, because i want to enter barcode numbers in a form through a barcode scanner, and the scanner triggers lostfocus event after entering one value. hence no chance of using other event for my code except lostfocus.
when the processing is done (actually saving the barcode + other info into databasE) the same textbox should be ready to take next input without any user help.
-
Mar 5th, 2005, 12:17 PM
#2
Re: setfocus help needed
Barcodes have special start/stop characters. Usually the * for 3of9.
So if I understand correctly, your scanner triggers the LF event after the
entire barcode has been entered?
You could just call the Text1.SetFocus method at the end?
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 
-
Mar 14th, 2005, 12:11 PM
#3
Addicted Member
Re: setfocus help needed
i sometimes have an issue returing focus to an object that has lost focus.
usually set focus to another object on the form first, then you should be able to return it to the first object in question.
if you fail to plan, you plan to fail
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
|