473,698 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Right Clicking a MDI child form does not change the focus to the form

2 New Member
My main program is a Multiple Document Interface (MDI). I create and show 2 or more child forms inside the MDI parent. If I left click on the child forms, the focus and Z-index will change correctly. (E.G. I have form1 and form2 as the child forms, form1 is active. I left click anywhere on form2 and the focus and z-index changes). This works correctly.

However, if I right click on the non-active form the focus and z-index does not change. In my program I have context menus for the forms; these context menus appear correctly, but again, the focus and z-index does not change.

I created a simple test program: a MDI parent form with the containing area and a button to create new forms. The new button does:

Expand|Select|Wrap|Line Numbers
  1. Form childForm = new Form(); 
  2. childForm.MdiParent = this; 
  3. childForm.Show();
  4.  

With this, the same issue arises. I can switch focus and z-index by left clicking between the child forms but I cannot switch by right clicking. I also checked the MDIChildActivat e event. This event is fired when I left click, but not when I right click.

I checked Excel (2003) and right clicking does change the focus and z-index. So my assumption is that it is a bug. My hope is that I can find a workaround that doesn't involve adding code to everyone of my child forms.



I know that if .Show() is called on a child form (or any of its components) before its parent is set, a bug happens were the user can only switch between the child forms by clicking on their titlebars or form edges. I discovered this bug a while back, but did not realize that Right clicking had the same symptoms and was not corrected when I moved any .Show() events in the form to code after .MdiParent was set.

Would this question be more applicable in the c# forum? I'm not sure if this bug happens in Visual Basic or if its just c#.
Aug 5 '10 #1
1 1764
Joe Wyrwas
2 New Member
Was anyone able to duplicate this bug?
Aug 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2490
by: Brian | last post by:
I'm trying unsuccessfully to use a variable in a script that changes focus. Depending on which link a user follows (navigates via keyboard or clicks), I'd like to change the focus to an input name="q" in different forms on the page. <A onClick="changeFocus('basicsearch')" HREF="#basic">basic site search</A> <A onClick="changeFocus('advancedsearch')"
4
2143
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see "TAG#") when more than 1 number (see "VLANS") is inputed into my form. QUESTION: How do I make my dynamic form have a dynamic input box(which is created by checking the checkbox and calling the functionC1) inside it and still be able to pass the...
6
537
by: Chris Thunell | last post by:
Right now I have a vb.net windows form project that does a whole bunch of things on the form.load event. The problem with this is that the user does not see the form until all the those things are done. Is there a way for a form to be shown first AND THEN have it automatically start to run through my code? (perhaps a different event??? form.paint, form.activate) Right now... the form is running but the user can't see it, and so they...
5
10120
by: Petec | last post by:
Is there a way to prevent a form from getting focus? Thanks! - Pete
1
1487
by: DomGo | last post by:
Hi, I try to open a form, that automatically loses focus to the window, that had the focus immediatly before the new form has been opened. The new form is topmost and displays a message only for a certain time, while the user can work on his current window. Everthing works except the fact, that the opened form gets the focus. I tried to catch the WindowsActivated Event to pass the focus back to the "LostFocus"-Window. But for any...
13
3605
by: M O J O | last post by:
Hi, I need to create a popup form what will not steal focus. I've searched the net and I managed to put some code together. Below is the result of my code, but I have a single question .... how can I prevent form2 to show in taskbar? I've tried to set the ShowInTaskBar to false, but then an exception is thrown. Here's my code:
2
2606
by: Susan Sullivan | last post by:
How can I change properties of a child form through a parent form? I have a child form with a rich text box. I want to control font properties of the rich text box through a menu on the parent form. How do I get the two to talk to each other?
3
4433
by: Ricardo Maciel | last post by:
The How to page: http://msdn2.microsoft.com/en-us/library/7aw8zc76(VS.80).aspx walks through the creation of MDI child forms. It includes instructions to set the property MdiList to maintain a list of open MDI child windows. However, I can't find the MdiList property in the properties panel.
4
4301
by: Jon Slaughter | last post by:
I've created some custom controls and forms that allow the feature to temporarily transfer focus to a control that has been entered by the mouse. Everything seems to work fine but the problem I have is that sometimes I seem to loose the original "holder" of focus and when the user hits tab while using "temporary" focus(while the mouse is over a control) it will change focus to the next control but not update it. So I have several issues....
3
1807
by: chuck gregory | last post by:
I'm using the 2002 (10.6771.6845) SP3 Access program. I have a form that will not show previously entered data. It has about 45 fields. I will call it the "parent" form. The "parent" form was at one time linked to another form, but I deleted the link since it is not needed. To troubleshoot it, I saved it with a new name, the "child" form. Then I created a table with two fields. I entered data in the two fields of the "child" form. I...
0
8674
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
9028
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
8895
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
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7728
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...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
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
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.