Re: menuitem is an object ??
From: Agnes (agnes_at_dynamictech.com.hk)
Date: 08/25/04
- Next message: Joel Eisenhandler: "Re: How can I connect a dbf file in .net ?"
- Previous message: Agnes: "Re: disable menuitem during run-time"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: menuitem is an object ??"
- Next in thread: Mick Doherty: "Re: menuitem is an object ??"
- Reply: Mick Doherty: "Re: menuitem is an object ??"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 10:16:47 +0800
Thanks for all reply.
Menuitems don't have a name at runtime?! My god. It is a must that I need to
disable some menuitem during run-time. My approach is "My application got
one menu bar , every user got its security tables, he/she got different
permission in each forms. e.g Invoicing , user A allows to use invoice, but
not user B'
As userB Login the application, i need to disable the 'Invoice menu' .
HOWEVER, I can't use the menuitem.text becauese the menu item will be
displayed in GB or B5, or English.
May be I need to change my security design....
>From AGnes
"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@msn.com> ¦b¶l¥ó
news:evidTHfiEHA.632@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
> Agnes,
> As Imran suggests.
>
> MenuItem is an object, however it is NOT a control.
>
> Your form has both a Menu property that is the main menu, and a
ContextMenu
> (inherited from Control) that is used for context menus.
>
> You need to use the MenuItems collection of the respective menu.
>
> > I need to Me.mnuXXX.Enabled = false during run-time
> > Anyone know how can do that ??
>
> Have you tried?
>
> Me.mnuXXX.Enabled = False
>
> Or are you wanting to dynamically set a menu.Enabled to false based on a
> string? Remember MenuItems don't have names exposed at runtime (they are
> compile time only).
>
> Hope this helps
> Jay
>
>
> "Agnes" <agnes@dynamictech.com.hk> wrote in message
> news:%232G8p2eiEHA.344@TK2MSFTNGP10.phx.gbl...
> > dim c as controls
> > for each c in me.controls
> > messagebox.show(c.name)
> > next c
> >
> > I found that the menu time didn't show up ?? It didn't belongs to the
> > control in the form ???
> > I need to Me.mnuXXX.Enabled = false during run-time
> > Anyone know how can do that ??
> >
> >
>
>
- Next message: Joel Eisenhandler: "Re: How can I connect a dbf file in .net ?"
- Previous message: Agnes: "Re: disable menuitem during run-time"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: menuitem is an object ??"
- Next in thread: Mick Doherty: "Re: menuitem is an object ??"
- Reply: Mick Doherty: "Re: menuitem is an object ??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|