Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 14 Mar 2008 17:39:50 +0700,    group: microsoft.public.dotnet.framework.windowsforms.controls        back       


problem with removing entry in MenuStrip.Items resolved ...   
Turns out the Find, RemoveByKey, and the optional form of indexing using a 
stirng key with MenuStrip.Items["key"] ... all depend on having a string 
which duplicates/matches the Name of the ToolStripMenuItem.

By setting the Name property of each created ToolStripMenuItem object to its 
Text  property, I can then delete them okay.

I had been assuming, incorrectly, that because I was doing the deleting 
inside the Form_Closing event of a top-level window by enumerating the 
Application.OpenForms collection that THAT context was what was complicating 
what I was trying to do in some way ... even though I knew I was carefully 
only deleting the menu item on other Forms than the one whose Form_Closing 
event was being called.

Live and learn :)

thanks, Bill
date: Fri, 14 Mar 2008 17:39:50 +0700   author:   Bill Woodruff

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us