How to set the focus of two forms
-
Recently I design a custom comboBox control,this control includes two forms.The one of the forms is inherit from the namespace that System.Windows.Forms.ComboBox,When active DropDownEvent,The second form will be shown.But the focus is moved on the new form. However,I want keep the focus still on the main form. Will you help me,please? Thanks. MSN:tomatoboy78@hotmail.com ,you can email to me.;)
-
Recently I design a custom comboBox control,this control includes two forms.The one of the forms is inherit from the namespace that System.Windows.Forms.ComboBox,When active DropDownEvent,The second form will be shown.But the focus is moved on the new form. However,I want keep the focus still on the main form. Will you help me,please? Thanks. MSN:tomatoboy78@hotmail.com ,you can email to me.;)
From what I understand you have two forms : a mainForm, and a "dropDownForm". When you press the drop down button you wish to show the dropDownForm but keep focus on the mainForm. If you do that the dropDownForm will not be visible (only if you make it allways on top, whitch is not a good thing, let's say you switch to an other aplication...in this case you will see the dropDownForm). I recommend you to forward all the focus actions you wish to keep onto the mainForm from the dropDownForm. I hope you understand...because is a rough world out there...