By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,495 Members | 1,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,495 IT Pros & Developers. It's quick & easy.

Prevent non-modal popup focus on show

P: n/a
I create and position a form containing a popup list la combobox list.
When I either Show() it or set popup.Visible = true it steals the focus. I
can put the focus right back where it was but the titlebar of the main form
flickers.

If I use a flag suppressPopupFlicker and override WndProc to ignore
WM_NCACTIVATE just while the popup is being shown then visually I get what I
want but the host form then doesn't know it's lost the focus so I don't get
the popup's Deactivate event or the host's Activate events firing, and of
course I can't explicitly set the host's Focused property.

Has anyone else handled this situation successfully and if so what was the
general strategy?
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.