[RESOLVED] [1.0/1.1] .net cf ShowDialog problem.
Hey guys,
I got a simple form1, which has a button1. When i click button1, it then open another form, which is form2, by using ShowDialog method. When i close the form2, i set the focus to form1. But the focus remains in button1. even if i have another button2, which i click on it (no code), i supposed the focus is on button2, but it eventually goes back to button1. how is this suppose to be? the focus is remain to a particular button after ShowDialog is fired.
need help urgently. thanks.
Re: [1.0/1.1] .net cf ShowDialog problem.
Check your tab order. What is the TabIndex for each button?
Re: [1.0/1.1] .net cf ShowDialog problem.
im soree because this is an mobile app. can u move this thread to mobile forum?
Re: [1.0/1.1] .net cf ShowDialog problem.
Re: [1.0/1.1] .net cf ShowDialog problem.
Re: [1.0/1.1] .net cf ShowDialog problem.
I don't see what the problem is. If you click on a button, and in the button click event another form is shown with ShowDialog, then when that second form goes away, it makes sense for the focus to return to the button. Where else would it be?
Re: [1.0/1.1] .net cf ShowDialog problem.
Shaggy Hiker,
yea, it makes 100 senses after button click event and the form goes away, the focus return to the button itself. but my problem is, i wan to set the focus to another control, but it just remain in the button itself. even i click another button/combobox/textbox, the focus is still remain in the button itself.
Re: [1.0/1.1] .net cf ShowDialog problem.
Normally, you'd use Button2.Focus() to set the focus to the second button, but you say that the focus will switch back on it's own. That seems kind of odd. Is there anything that specifically sets the focus to the first button?
Re: [1.0/1.1] .net cf ShowDialog problem.
yes, to set the focus after using showdialog method make me sick.