473,545 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
flickers.

If I use a flag suppressPopupFl icker 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 1533

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1120
by: Ross Pellegrino | last post by:
Hi I know about Component Licensing. However, that Component Licensing is not well suited for my particular need. I understand about runtime and design time components but I want my components to be used by non-GUI apps as well. I have an Assembly with many non-design classes that I would like only licensed developers to use. However,...
6
7950
by: Squeamz | last post by:
Hello, Say I create a class ("Child") that inherits from another class ("Parent"). Parent's destructor is not virtual. Is there a way I can prevent Parent's destructor from being called when a Child object goes out of scope? Specifically, I am dealing with a C library that provides a function that must be called to "destruct" a...
7
16614
by: L Mehl | last post by:
Hello -- In a form text field for entering stock symbols, I want to allow only: alpha integer decimal backspace left and right arrows delete shift
3
5499
by: Travis | last post by:
I am trying to prevent an exception from bubbling up from one nested Try/Catch Block to its "Parent" Try/Catch Block. Here is some example code: try{ try{ //Non-application killing code that causes the exception } catch(Exception ex){ //Exception is caught and logged here
5
3125
by: R. Ian Lee | last post by:
I have an ASP.NET page that spawns a popup window using javascript's window.open. This works fine. It pops up, you enter some data, press save and everything saves as it should. But, if you click the button to open the popup again, then it opens with the values that were in it before the "save" was executed. I've determined that the...
11
3038
by: moondaddy | last post by:
I have images that I need to prevent the user from doing a right click and selecting "Save Picture As"? How can I do this? -- moondaddy@nospam.com
8
10989
by: jaibux | last post by:
Everybody knows how to open (or clone) the same page that you are viewing in a new browser window by CTRL+N or via File->New Window. the question is how to PREVENT to open the SAME WEB APPLICATION (with the same session) in two or more browser windows. any ideas? jaibux@gmail.com
9
6727
by: Arthur Dent | last post by:
Hello all, i am at idea's end here... We have an ASP.NET 2 app, which we want to prevent from ever timing out... i have tried every thing i can think of... and have search all over, and have not found anything new; I have tried putting little spots in my master page which call back to the server on a regular interval. I make sure to give them...
5
1364
by: mosfet | last post by:
Hi, In one my class I would like to give access to one of my buffer so I have declared something like this : vector<char>& RespData = pWebResp->get_RawBuffer(); The problem is caller can also write this : vector<charRespData = pWebResp->get_RawBuffer();
2
1493
by: donbock | last post by:
The paper Volatiles are Miscompiled, and What to Do about It by Eide and Regehr reports that mishandling of volatiles is a common category of compiler bugs. You should read it if you use volatiles for memory-mapped I/O or thread synchronization. Almost in passing they describe a common programmer error with volatiles: Inserting a...
0
7486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7676
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7442
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7776
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6001
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
1905
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
729
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.