After I open a form with it's Show function, I cannot figure out how to have that newly opened non-modal form have keyboard focus. I have tried every combination of FF_Control_ShowState and even tried SetActiveWindow. Setting focus on a control on the new form doesn't do anything either. I can click on the window and then it gets focus but want to avoid that extra step. What say you window wizards?
I got it....PostMessage with %WM_SETFOCUS does the trick....
Hmm.., usually the new form should have the focus automatically. But maby I didn't understand the problem properly.
I added a minimum project with two forms. Form1 has a button to whow Form2. Form2 has a textbox. When you open Form2 (modal or nonmodal) the textbox on Form2 has the focus.
The forms I was having issues with use listviews and buttons. The listview is at the top of the tab order and the first row is shown as selected but the form did not have the focus. %WM_SETFOCUS works on these forms....I never expected such a quick response at this hour.... 8)
Response probably has to do with location - it is 10:00 am here (Germany).
Remember - the sun never sets in the FireFly Kingdom. (...or was that another kindgom?)
Midnight in Alaska, USA at 61 degrees north latitude where it is quickly getting to the point where the sun will still be up.... :D