I'm having some problems using the KeyPress event in various winForms.  I
want to have a common keypress event set of code that will process of the
F-Key presses.  I have the code worked up but I am finding that on different
forms the event doesn't fire.  For example, when I added a tabbed control to
the page, the form's keypress event stopped firing.  However, the tabbed
control's keypress event is working.  So I just moved the code from the
form's keypress event to the tabbed controls keypress event.  The problem
here is that I only want one type of keypress event for ALL of my forms and
sometimes I cannot find a keypress event that actually works.  A good
example of that is where I have 3 or 4 panels on a single form and I want
one keypress event to process every keypress on the form itself... as
opposed to having individual keypress events for each panel.

Any ideas how I could build a keypress event that would work on all forms
regardless of what's on them?  Just one keypress for everything on the form.
You figure that the form_keypress event would be what I am looking for.
However, it doesn't always work.  Am I missing something?

Also, I am trying to use an MDI parent/child form to create an IDE like UI
for this application.  The problem here is that MDI isn't exactly what I
need because you can only create ONE instance of each form.  So I do not
want to create the traditional multi-document interface like used in
something like Word or Excel.  What I want is something that loads the child
form within the parent form... and I don't want to have to control it.  I
figured that using an MDI form but only allowing the child forms to open
once copy of the form, would sort of give me the results I am looking for.

What I would like to know is if there is another way to handle this?  What I
would like is something like how the .Net IDE works.  You have the parent
form with child forms, but you can only open one instance of each child form
at a time... as opposed to multi like you could in Word or Excel.

How would you recommend this sort of IDE be built?  Should I be using the
MDI parent/child forms?  Is there an easier way to build IDEs like this?

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to