Showing results for 
Search instead for 
Did you mean: 

Setting focus outside a control when no other control can get the focus

Former Member
0 Kudos


I'd like to know if there is a way to setfocus outside of a control even if there is no other control to receive the focus.

I have an editbox that has the focus (active) and I want to set visible to false to this control., but I cannot since it has the focus and there is no other controls that can get the focus.

As a temporary measure I've added another editbox that I moved outside of the visible interface to which I've moved the focus. But I would like to know the proper way to do this.

Thank you for your help.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I think you are asking how to bring a windows form to the front.

If not I apologize...

The way I have done this:

1. I created a new thread.

2. I maxmized the window

I set the following properties:

ShowInTaskbar = False

TopMost = True



In all my testing I needed the window to be maximized, if it wasn't B1 stayed on top.

Former Member
0 Kudos

Hello John

I basically want to make visible=false an Editbox but I cannot since the Editbox has the focus and there are no other control that can get the focus on the form.

I thought of giving the focus to the form itself but I couldn't get anywhere with this solution.


Former Member
0 Kudos

Add to the form other item (edittext for example) and set coordinates of this item as negative - so, it will be never visible on the form and you may set focus on it before visible = false to textbox.

Former Member
0 Kudos

Hello Petr

This is what I do right now, but I was wondering if there was a cleaner way to do this so that the FormChecker doesn't throw a warning.

Thank you