retaining focus

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!
 
P

Peter Foot [MVP]

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
 
V

V. Jenks

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top