Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Alex Gefter
  Where is Alex Gefter?
 Detroit
 Michigan - United States
 Alex Gefter
 Tags
Subject: RE: Set Focus
Thread ID: 232008 Message ID: 232009 # Views: 50 # Ratings: 1
Version: Visual FoxPro 7 Category: General VFP Topics
Date: Thursday, June 18, 2009 9:57:42 PM         
   


> Hello,
> I am having difficulty in setting focus on the control I need.
>
> Here is the situatuion.
>
> On my form, I have a textbox that accepts only scans and a button. The button is not enabled until the scan happens.
> There are no keyboard or mouse - just a barcode scanner and a touch screen.
>
> The button should only appear after the barcode is scanned and verified. At this point my barcode is saved and the textbox is cleared. Button only should serve as an available option.
>
> My problem is to return the focus to the textbox and not have it on the button at all.
>
> I am trying to use Control.SetFocus but it doesn't work...
>
> Thank you for your help.
>
>
>
> AG

*Textbox Lostfocus

* code ... if any

if ScanIsValid
 * no problem, let it go
else
 NODEFAULT
 this.SetFocus()
endif


Cetin Basoz

.Net has got better.Think about moving - check my blog:
Blog (main)
Blog (mirror)



COMPLETE THREAD
Set Focus Posted by Alex Gefter @ 6/18/2009 9:35:35 PM
RE: Set Focus Posted by Cetin Basoz @ 6/18/2009 9:57:42 PM
RE: Set Focus Posted by Andy Kramek @ 6/18/2009 11:13:21 PM
RE: Set Focus Posted by Ammar Hadi @ 6/19/2009 2:35:15 AM
RE: Set Focus Posted by Yousfi Benameur @ 6/19/2009 11:04:34 AM