添加自定义弹出菜单以形成快捷菜单 [英] Adding custom popup menu to form shortcut menu

查看:90
本文介绍了添加自定义弹出菜单以形成快捷菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在我的数据库开始时,我创建一个弹出菜单并将其添加到菜单栏,以便在整个应用程序期间保存。我有这个作为自定义菜单项我一直使用没有问题,但我最近决定也将它添加到主窗体的快捷方式
菜单,我不知道如何做到这一点,而不创建相同的菜单和所有它的控件从头再次为快捷菜单。有没有办法将现有的菜单弹出窗口重复用作快捷菜单上的项目?



谢谢

解决方案

您好,


您的意思是要将自定义弹出菜单添加到指定的表单吗?您可以将表单的快捷菜单属性设置为是,并将快捷菜单栏设置为菜单名称。


您也可以通过VBA代码。

私有Sub Form_Load()
Form.ShortcutMenu = True
Form.ShortcutMenuBar =" CustomPopupMenu"
End Sub

最好的问候,


Celeste



So at the start of my database I create a popup menu and add it to the Menu Bar so it is saved throughout the duration of the application. I have this as a custom menu item which I have been using no problem but I recently decided to also add it to the shortcut menu of the main form and I cant see how this is done without creating the same menu and all its controls from scratch again for the shortcut menu. Is there a way to reuse an already existing menu popup as an item on a shortcut menu?

Thanks

解决方案

Hello,

Do you mean you want to add the custom popup menu to a specified form? You could set the form's Shortcut Menu property to Yes and set Shortcut Menu Bar as your Menu name.

You also do it via VBA code.

Private Sub Form_Load()
Form.ShortcutMenu = True
Form.ShortcutMenuBar = "CustomPopupMenu"
End Sub

Best Regards,

Celeste


这篇关于添加自定义弹出菜单以形成快捷菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆