Programatically Set Focus

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
tconley@semprautilities.com
Posts: 13
Joined: Fri Dec 11, 2009 9:09 am

Programatically Set Focus

Post by tconley@semprautilities.com » Tue Jan 12, 2010 1:37 am

How do I programatically set focus on elements of my form. I am basically writing a data collection form. Some of the data will be provided by a barcode scanner and some by that admin who is collecting the data. The barcode scanning reads a text string and adds an enter to the end of the text string. I would like it to automatically advance to the next text feild on enter and then when the submit button is clicked focus should return to a specific text element in the form. I am trying to make this as quick as possible to collect data at the moment after the data is collected the person has to hit tab to advance to the next field and reselect the starting text element after they do a submit. I have several thousand devices to scan so quick is good.

Can Anyone Help???

uploads/16537/datacollector.zip

User avatar
tconley@semprautilities.com
Posts: 13
Joined: Fri Dec 11, 2009 9:09 am

Programatically Set Focus

Post by tconley@semprautilities.com » Tue Jan 12, 2010 1:54 am

The question is how to move it on. I can monitor for the enter key but how do i set focus to antoher form element?

Locked