mjb3030 Posted November 29, 2003 Posted November 29, 2003 Why is it that when I do this: With mnuFile .menuitems.add("&New", new eventhandler(addressof mnuNew_Click)) End With it works, but when I use the constructor with a shortcut: with mnuFile .menutems.add("&New", new eventhandler(addressof mnuNew_Click), Shortcut.CtrlN) End With I get the error "BC30516: Overload resolution failed because no accessible 'Add' accepts this number of arguments." Quote
*Experts* Volte Posted November 29, 2003 *Experts* Posted November 29, 2003 That's not the constructor, that's the Add() method of the MenuItemCollection. Try using this instead:With mnuFile .menutems.add(New MenuItem("&New", New eventhandler(AddressOf mnuNew_Click), Shortcut.CtrlN)) End With Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.