473,806 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

switching between MDI child forms

To switch between the child forms in an MDI app, you can use ctrl-tab.
I want to eliminate that option. I don't want to let the users
switch between the children. I tried using KeyPress and KeyDown in
the MDI parent form but I couldn't catch both the ctrl and tab clicks.
Any suggestions? Thanks in advance.
Nov 16 '05 #1
3 7014
I checked into this, and I believe you do *not* want to use an MDI form in
this scenario.

Telmo
"Leslie" <ha*****@hotmai l.com> wrote in message
news:59******** *************** ***@posting.goo gle.com...
To switch between the child forms in an MDI app, you can use ctrl-tab.
I want to eliminate that option. I don't want to let the users
switch between the children. I tried using KeyPress and KeyDown in
the MDI parent form but I couldn't catch both the ctrl and tab clicks.
Any suggestions? Thanks in advance.

Nov 16 '05 #2
I have to use an MDI form. I tried doing an override of the
OnKeyPress event but it doesn't get fired. I also tried KeyPress and
KeyDown events on the MDI parent form and the KeyDown gets fired, but
i am unable to capture the ctrl-tab combo. It is only seeing one of
the items. Here is the code:

private void FrmParentMDI_Ke yDown(object sender,
System.Windows. Forms.KeyEventA rgs e)
{
if (e.KeyCode == Keys.Tab && (ModifierKeys & Keys.Control) != 0)
{
e.Handled = true;
}
}

Thanks

"Telmo Sampaio" <te***********@ hotmail.com> wrote in message news:<#6******* *******@TK2MSFT NGP12.phx.gbl>. ..
I checked into this, and I believe you do *not* want to use an MDI form in
this scenario.

Telmo
"Leslie" <ha*****@hotmai l.com> wrote in message
news:59******** *************** ***@posting.goo gle.com...
To switch between the child forms in an MDI app, you can use ctrl-tab.
I want to eliminate that option. I don't want to let the users
switch between the children. I tried using KeyPress and KeyDown in
the MDI parent form but I couldn't catch both the ctrl and tab clicks.
Any suggestions? Thanks in advance.

Nov 16 '05 #3
I have to use an MDI form. I tried doing an override of the
OnKeyPress event but it doesn't get fired. I also tried KeyPress and
KeyDown events on the MDI parent form and the KeyDown gets fired, but
i am unable to capture the ctrl-tab combo. It is only seeing one of
the items. Here is the code:

private void FrmParentMDI_Ke yDown(object sender,
System.Windows. Forms.KeyEventA rgs e)
{
if (e.KeyCode == Keys.Tab && (ModifierKeys & Keys.Control) != 0)
{
e.Handled = true;
}
}

Thanks

"Telmo Sampaio" <te***********@ hotmail.com> wrote in message news:<#6******* *******@TK2MSFT NGP12.phx.gbl>. ..
I checked into this, and I believe you do *not* want to use an MDI form in
this scenario.

Telmo
"Leslie" <ha*****@hotmai l.com> wrote in message
news:59******** *************** ***@posting.goo gle.com...
To switch between the child forms in an MDI app, you can use ctrl-tab.
I want to eliminate that option. I don't want to let the users
switch between the children. I tried using KeyPress and KeyDown in
the MDI parent form but I couldn't catch both the ctrl and tab clicks.
Any suggestions? Thanks in advance.

Nov 16 '05 #4

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

Similar topics

8
4942
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender, System.EventArgs e) { MessageBox.Show("keyboard button pressed!"); } Following is the code to load the frmTestBaby
3
5619
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent window. I have set all my child windows to be WindowState.Maximized but after showing 2 or 3 windows, the windows all drop back to Normal state. I have tried various things to overcome this inclusing overriding OnResize etc but none seem to give...
3
9713
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI parent menu functions. if i select draw line in MDI parent, the line should be drawn in current active child..any URLS for this or guide me to achieve this communication... -- Mähésh Kumär. R
3
3217
by: Lance | last post by:
I've noticed that controls that are contained in MDI child forms fail to raise MouseLeave events if the MDI child form's MdiParent property is set to Nothing (after it was set to an existing MDI container form) or if the MDI child form's Visible property is set to False (after the MDI child form was shown). This is an enormous problem for my app because I must show different MDI child forms based on the state of my application and many of the...
10
4032
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms, remove the controls on each of them, and then close the form, but this code should execute only...
1
1185
by: Bernie Yaeger | last post by:
I have an mdi container that is opened max. Inside can be zero or dozens of child forms. One of the forms - my reporttree - is to be opened normal; all others maximized. When you have the reporttree opened and you open another on top of it, that's fine, but when you switch to the reporttree, I have the following code in a timer loop inside my mdi container: Dim child As Form For Each child In Me.MdiChildren If child.Name =...
2
2165
by: Lenster | last post by:
Environment --------------- Visual Studio.NET 2003 Version 7.1.3088 ..NET Framework 1.1 Version 1.1.4322 SP1 XP Professional 5.1.2600 SP2 Build 2600 Problem Description ----------------------- I have an mdi parent form.
3
4390
by: Simon Verona | last post by:
I have a parent form which contains a toolbar. The toolbar controls the loading and switching to of MDI child forms. The code for the toolbar click event and one of the subroutines that loads and shows a child form is: Private Sub tbMenu_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbMenu.ButtonClick Dim btn As System.Windows.Forms.ToolBarButton For Each btn In...
13
2953
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the events.. But the regular forms that are also open do not receive that event. This is true whether there are child forms open or not.
0
9719
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10620
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10369
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10372
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9187
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4329
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
3
3008
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.