Change focus after form loaded?

Hey there,

I have a customization on MES/Start Production where I want to change the focus to a text box for scanning in the job/assembly/operation sequence.

So I added the focus in the form load, but it ignores that and sends focus to the job number text box. I also added it to the end of the initialization code with the same result.

Is there another way to trigger something after the form is loaded?

Thanks,

Joe

Try the form Shown event, you are running into a timing issue. (A race condition)

1 Like

image

3 Likes

Cool, thanks.

I got another suggestion to add control.Select() after the focus and that fixed the immediate issue. This will be helpful, too.

Joe

1 Like

I like it. :slight_smile:

amazing, definetly this works!