473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Apparent change (bug?) in MenuItemCollection.Clear()

I have just converted one of my applications from .Net 1.1 / VS2003 to
..Net 2.0 / VS2005. I'm now seeing some different behavior in my app.
Here's a simple case description:

Form 1:
Stock form with MainMenu and one MenuItem (menuItem1) which has several
sub-MenuItems of its own.
IsMdiContainer = true.
Has a button (button1).

EVENTS:
private void Form1_Load(object sender, EventArgs e)
{
Form2 f = new Form2();
f.MdiParent = this;
f.Show();
}
private void button1_Click(object sender, EventArgs e)
{
while (menuItem1.MenuItems.Count 0)
{
menuItem1.MenuItems.RemoveAt(0);
}
// .Clear didn't work, so I also tried an "Iterative" approach
// this.menuItem1.MenuItems.Clear();
}

Form2:
Stock form with MainMenu and one MenuItem which has several
sub-MenuItems of its own.

Visual Studio 2003:
Run the program. Press the button. The menu clears out.

Visual Studio 2005:
Run the program. Press button. The menu does not clear out.

Is this a bug or is this intentional? Has anyone else seen this (and
do you know how to fix it?)

Note: .Clear DOES seem to work in non-mdi situations.

Sep 11 '06 #1
0 1165

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

Similar topics

7
by: Will Hartung | last post by:
Hi all... I'm working on a site that is show up a strange float bug (shocking I know) using Mozilla 1.7. You can see the problem here: http://www.marieosmond.com/Catalog1.aspx?coll=Y&page=2...
4
by: Gianluca L. Monteleone | last post by:
Hi Folks! I have this strange error that happens after conversion from A97 to AXP (2000-Format). Looks like a bug to me - I've lost 3 days with no result. I use a form with 2 subforms on it,...
1
by: Brian Henry | last post by:
Does anyone know where the change / bug fix list for .NET 1.1 SP1 is? it'd be nice to know what fixes will be in when it's release later this year, thanks!
4
by: WXS | last post by:
In a case you have Project/Assembly A references Project/Assembly B which References Project/Assembly C. Let's say Project A needs be and references it directly. Unknown to A, B needs project C's...
158
by: Giovanni Bajo | last post by:
Hello, I just read this mail by Brett Cannon: http://mail.python.org/pipermail/python-dev/2006-October/069139.html where the "PSF infrastracture committee", after weeks of evaluation, recommends...
38
by: Mark Dickinson | last post by:
I get the following behaviour on Python 2.5 (OS X 10.4.8 on PowerPC, in case it's relevant.) (0.0, 0.0) (-0.0, -0.0) I would have expected y to be -0.0 in the first case, and 0.0 in the...
34
by: pamela fluente | last post by:
I would like to hear your *opinion and advice* on best programming practice under .NET. Given that several time we cannot change: MyCollection.Clear into the instantiation of a NEW...
3
by: Gabriel Zachmann | last post by:
Well, could some kind soul please explain to me why the following trivial code is misbehaving? #!/usr/bin/python lst = s =
4
by: John Biggs | last post by:
I'm running a 2.0 .NET app on my local machine; the app uses Global.asax to trigger logic at both Application and Session Start. Up until this week, session management in this application was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.