retaining focus

  • Thread starter Thread starter V. Jenks
  • Start date Start date
V

V. Jenks

My form must load and the first field must be focused
upon. I can do this just fine.

However, I'm working on a project where the user has a bar-
code reader sleeve on his iPaq. This simply acts like a
SIP and saves him time entering data, it reads it in for
him.

This scanner software shows a quick popup message upon the
first scan, all subsequent scans are normal with no popups.

When this popup occurs it takes the focus off of my form
and the form field I want focused.

How do I force the form to stay on top regardless of any
other programs that decide to run/popup?

I've tried the LostFocus event, can't seem to get it to do
anything (calling this.Focus() or formField.Focus())

Thanks!
 
When the popup disappears your form should regain focus. So adding code into
the GotFocus() method to set the focus to the textbox will get called once
the popup dialog has gone.

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
Handheld Interactive Reference Guides
 
I SWEAR I tried this, I've been going back and forth with
the GotFocus and LostFocus events for hours, finally just
using the GotFocus event alone to focus on the first form
field worked, thanks!

-v
 
Back
Top