我的经验 在窗口启动的时候先调用SetMenuTag函数
譬如
private sub SetMenuTag()mnuFileNew.Tag=1;
mnuFileOpen.Tag=2
end sub然后登录以后调用 '再这里假设UserPower=2 (当然这个值你可以自己任意设定)
public sub SetMnuVisible
'根据登录得人的权限设置菜单得可见性
mnuFileNew.visible=mnuFileNew.Tag and UserPower
mnuFileOpen.visible=mnuFileOpen.tag and UserPowerend sub这样只要你提前设置好tag 灵活修改UserPower就行了 非常得方便修改和移植
并且只与UserPower的值有关,根本不用存储菜单得什么消息了
譬如
private sub SetMenuTag()mnuFileNew.Tag=1;
mnuFileOpen.Tag=2
end sub然后登录以后调用 '再这里假设UserPower=2 (当然这个值你可以自己任意设定)
public sub SetMnuVisible
'根据登录得人的权限设置菜单得可见性
mnuFileNew.visible=mnuFileNew.Tag and UserPower
mnuFileOpen.visible=mnuFileOpen.tag and UserPowerend sub这样只要你提前设置好tag 灵活修改UserPower就行了 非常得方便修改和移植
并且只与UserPower的值有关,根本不用存储菜单得什么消息了
解决方案 »
- text1里自定义 数值,怎么取出来
- vb.net2005中怎么或得窗体的活动控件??
- magic eDeveloper9.4,欢迎你加入Magic QQ 群:6421449
- 谁能告诉我,我的VB出什么问题了?????
- 请问这样的情况下怎样实现sqlserver2000的安全性
- 读文件内存映射的问题~~~
- vb+sql :my.open "select * into tablename1 from tablename2 where name=up and
- 请各高手帮帮忙!!!如何使 DataReport 能够在使用者用的时候让他自己去改变DataReport的属性及格式?
- VB里怎样调用VC的DLL?
- 如何计算时间差.....
- GetWindowText在Windows 2000下失灵
- ActiveX 标准 EXE 怎么用?
能具体点吗??
我也要,谢谢[email protected]
你甚至可以引入组呀
为什么要用户自己设定权限?管理员才可以得呀。
你只要做一个模块让管理员可以修改UserPower的值不就行了