明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1312|回复: 1

[求助]帮忙看一下程序,解答一下小弟的问题

[复制链接]
发表于 2007-9-3 10:29:00 | 显示全部楼层 |阅读模式
Sub Example_AddMenuItem()
    ' This example creates a new menu called TestMenu and inserts a menu item
    ' into it. The menu is then displayed on the menu bar.
    ' To remove the menu after execution of this macro, use the Customize Menu
    ' option from the Tools menu.
    
    Dim currMenuGroup As acadMenuGroup
    Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0)
    
    ' Create the new menu
    Dim newMenu As AcadPopupMenu
    Set newMenu = currMenuGroup.Menus.Add("TestMenu")
    
    ' Add a menu item to the new menu
    Dim newMenuItem As AcadPopupMenuItem
    Dim openMacro As String
    ' Assign the macro string the VB equivalent of "ESC ESC _open "
    openMacro = Chr(3) & Chr(3) & Chr(95) & "open" & Chr(32)
    
    Set newMenuItem = newMenu.AddMenuItem(newMenu.count + 1, "Open", openMacro)
    
    ' Display the menu on the menu bar
    newMenu.InsertInMenuBar (ThisDrawing.Application.MenuBar.count + 1)
    
End Sub
用这个程序想调用自己的一个窗口,该怎么弄呢?
我觉得应该是openMacro这个东西,但又不知道这句话什么意思openMacro = Chr(3) & Chr(3) & Chr(95) & "open" & Chr(32)
请帮忙一下啊
谢谢了
发表于 2007-9-8 14:54:00 | 显示全部楼层

openMacro是一个执行的命令,

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-2-22 02:09 , Processed in 0.198528 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表