CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    When a Form is an MDI Child, it consumes some keyboard events i dont want consuming..

    I have found the problem with my textboxes not doing Copy/Paste/Cut/SelectAll from the keyboard shortcuts Ctrl+C, Ctrl+V etc

    When the textbox is placed on an MDI Child form, the form seems to do something to prevent the event reaching the control, meaning that while copy and paste from kayboard shortcuts work on any control not on an MDI child, they dont work when the form is MDI

    How do i investigate and cancel out or disable this behaviour? Not being able to cut/paste in textboxes is very annoying!
    Matt
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  2. #2
    Join Date
    Jan 2001
    Posts
    22

    Re: When a Form is an MDI Child, it consumes some keyboard events i dont want consumi

    Unable to reproduce. C#, 2005

    I'm able to create a MDI, with textboxes, then create children, with textboxes.
    cut/paste/copy all work fine.

    Is there something else you have running in the background to capture and handle keyboard strokes?

  3. #3
    Join Date
    Jun 2006
    Location
    North America
    Posts
    51

    Re: When a Form is an MDI Child, it consumes some keyboard events i dont want consumi

    This is not the normal behivor. There has to be something in your program that's eating the key events when you press them. You'll have to search your program to figure out where they are going, or if its small you can attach it and maybe someone else can find the error.

    Check the KeyPreview property on your MDI Child control. It should be set to FALSE.
    Sheesh Larone
    Software Engineer, IAS 2006

    I just threw back a red bull...what's your excuse? <excellerate speed=3.159> </excellerate>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured