can not focus on the form at run time
-
hi i am developing a vs2008 smart device application. in this project there is a form array which contains form objects. index of this array (forms) will be selected by the operator at run time. when the operator selects one form , it is focused by the form.Focus() Method. but this method returns false and form can not focus ! why?
-
hi i am developing a vs2008 smart device application. in this project there is a form array which contains form objects. index of this array (forms) will be selected by the operator at run time. when the operator selects one form , it is focused by the form.Focus() Method. but this method returns false and form can not focus ! why?
I think the problem is that the form isn't visible. Try to use this to set focus on form:
[DllImport("user32.dll")]
private extern static IntPtr SetFocus(IntPtr hwnd); -
hi i am developing a vs2008 smart device application. in this project there is a form array which contains form objects. index of this array (forms) will be selected by the operator at run time. when the operator selects one form , it is focused by the form.Focus() Method. but this method returns false and form can not focus ! why?