Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Modeless display - UserControl!

Modeless display - UserControl!

Scheduled Pinned Locked Moved C#
tutorialquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DotNetInterest
    wrote on last edited by
    #1

    Hi There is a Usercontrol which is displayed in the modeless state. Now i display another Usercontrol on top of the the other control and the other control is now completely invisible (it goes behind the new one i have shown now). The invisible control has a a button control in it and it has a mnemonic set so that upon a particular key press, it will fire its Click event code. Now when the user is currently working with the new Usercontrol that is displayed on top on the old one (which is currently invisible, but it is there), and hits a key, say "J", the old control's button control's click event gets fired. This is because the key "J" is its mnemonic. How to ensure that when that Usercontrol is not visible, the key down hit is not consumed by the hidden usercontrol's button control. and is used by the one on top - i.e. the new control. I hav tried all sorts - OnVisibleChanged(), OnLostFocus() etc where i tried to remove hte Click event handler from teh button's click event and adding it when the control becomes visible, etc, but these do not work. I think the only way to do that is to do something in hidden control's WndProc(). Any ideas?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups