470,870 Members | 1,815 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

Prevent non-modal popup focus on show

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

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
0 1471

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by R. Ian Lee | last post: by
11 posts views Thread by moondaddy | last post: by
9 posts views Thread by Arthur Dent | last post: by
5 posts views Thread by mosfet | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.