.net - Keep Window Inactive In Appearance Even When Activated -
Is there a way to look at the window, even if it has a focus? I have two forms (A and B) after interacting with user A, I focus my attention back to B. The result of focus transfers (when the user is clicked on A, focus is being transferred back to B.) This form is a blink to actively deactivate it looks ugly (especially on Vista where one moment is a large Shadow). In the end, I came to know the answer!
Warning: Do not misuse this answer technique. This will confuse your users and will generally be harmful to the computing experience. The technique below can be very useful in certain situations (like implementing behavior like intellence), but please understand it in your use
To convert a window to a non-client area (i.e. the boundary and title bar) to disable or activate the status of a window. The WMPM of the message shows that the state will be inactive or active. If wParam is true (value of 1), then the window will appear active. If wParam is incorrect (value of 0), then the window will appear inert to force a window to remain inactive or active, override wParam by setting it to the same value (0 or 1), and all of you Will be set!
Private contact int WM_NCACTIVATE = 0x0086; Safe Override Zero WndProc (Ref message message) {if (m.msg == WM_NCACTIVATE) {// Use it to always appear inactive: m.WParam = (IntPtr) 0; // Alternatively, use it to always look active: m.WParam = (IntPtr) 1; } Base.WandProc (Ref M); }
Comments
Post a Comment