PDA

Click to See Complete Forum and Search --> : 2 more menu problems


randalthor100
Nov 27th, 2002, 10:28 PM
Hello again

The answers are probably simple but i'm still lost in the conversion :( My first problem is this error

'System.Windows.Forms.Menu.MenuItemCollection' does not contain a definition for 'Item'

on this line

MenuItem dirToInputTo = favoritesMenu.MenuItems.Item(subDirNo);

it works in VB.net but menuItems doesn't have a .Item in c#. Is there a solution / workaround to this?

My second problem is

'System.Windows.Forms.Menu.MenuItems' denotes a 'property' where a 'method' was expected

on

if (favoritesMenu.MenuItems(i).Text == ("&" & folderBeforeSubDir))

Again this works in VB but i can't find the equivilent in c#. I'm trying to find the text of the menuItem i in the favorites menu

Can anyone help?

randalthor100
Nov 27th, 2002, 10:35 PM
oh dear....please ignore this lack of forethought.....i just found a solution somewhere else

thanks anyway