VBA工具栏图标格式怎么改变?
请问一下各位大侠,VBA工具栏图标格式怎么改变? 图标还要改什么格式,想变成怎样? 工具栏的图标知道怎样改变,但图标格式不知道怎样改变! 请问如何在菜单工具条上显示自己定义的图标啊? Dim newToolBarSeparator As AcadToolbarItem<BR> Dim SmallBitmapName(42) As String<BR> Dim LargeBitmapName(42) As String<BR> Set MenuGroupObject = ThisDrawing.Application.MenuGroups.Item(0)<BR> Set ToolbarObject = MenuGroupObject.Toolbars.Add("测量菜单")<BR> Dim Popen As String<BR> Popen = Chr(3) + Chr(3) + Chr(95) + "open" + Chr(13)<BR> Set ButtonObject(1) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "打开文件", "打开文件", Popen)<BR> Dim Psave As String<BR> Psave = Chr(3) + Chr(3) + Chr(95) + "qsave" + Chr(13)<BR> Set ButtonObject(2) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "保存文件", "保存文件", Psave)<BR> Dim Pprinter As String<BR> Pprinter = Chr(3) + Chr(3) + Chr(95) + "plot" + Chr(13)<BR> Set ButtonObject(3) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "打印文件", "打印文件", Pprinter)<BR> Dim Pcut As String<BR> Pcut = Chr(3) + Chr(3) + Chr(95) + "cutclip" + Chr(13)<BR> Set ButtonObject(4) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "剪切", "剪切", Pcut)<BR> Set newToolBarSeparator = ToolbarObject.AddSeparator(ToolbarObject.Count + 1)<BR> Dim pCopy As String<BR> pCopy = Chr(3) + Chr(3) + Chr(95) + "copyBase" + Chr(13)<BR> Set ButtonObject(5) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "带基点复制", "带基点复制", pCopy)<BR> Dim Ppaste As String<BR> Ppaste = Chr(3) + Chr(3) + Chr(95) + "pasteclip" + Chr(13)<BR> Set ButtonObject(6) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "粘贴", "粘贴", Ppaste)<BR> Dim Pbreak As String<BR> Pbreak = Chr(3) + Chr(3) + Chr(95) + "break" + Chr(13)<BR> Set ButtonObject(7) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "打断", "打断", Pbreak)<BR> Set newToolBarSeparator = ToolbarObject.AddSeparator(ToolbarObject.Count + 1)<BR> Dim Ptrim As String<BR> Ptrim = Chr(3) + Chr(3) + Chr(95) + "trim" + Chr(13)<BR> Set ButtonObject(8) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "截断", "截断", Ptrim)<BR> Dim Pextend As String<BR> Pextend = Chr(3) + Chr(3) + Chr(95) + "extend" + Chr(13)<BR> Set ButtonObject(9) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "延伸", "延伸", Pextend)<BR> Dim Pmove As String<BR> Pmove = Chr(3) + Chr(3) + Chr(95) + "move" + Chr(13)<BR> Set ButtonObject(10) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "移动", "移动", Pmove)<BR> SmallBitmapName(1) = "C:\Program Files\AutoCAD 2004\New Folder\POpen.BMP"<BR> SmallBitmapName(2) = "C:\Program Files\AutoCAD 2004\New Folder\Psave.BMP"<BR> SmallBitmapName(3) = "C:\Program Files\AutoCAD 2004\New Folder\Pprinter.BMP"<BR> SmallBitmapName(4) = "C:\Program Files\AutoCAD 2004\New Folder\Pcut.BMP"<BR> SmallBitmapName(5) = "C:\Program Files\AutoCAD 2004\New Folder\Pcopy.BMP"<BR> SmallBitmapName(6) = "C:\Program Files\AutoCAD 2004\New Folder\Ppaste.BMP"<BR> SmallBitmapName(7) = "C:\Program Files\AutoCAD 2004\New Folder\Pdd.BMP"<BR> SmallBitmapName(8) = "C:\Program Files\AutoCAD 2004\New Folder\Pcj.BMP"<BR> SmallBitmapName(9) = "C:\Program Files\AutoCAD 2004\New Folder\Pys.BMP"<BR> SmallBitmapName(10) = "C:\Program Files\AutoCAD 2004\New Folder\Pmove.BMP" 请问楼上的大侠:ButtonObject和SmallBitmapName是什么类型的变量(你怎么定义的)? 其中ButtonObject(10) = ToolbarObject.AddToolbarButton(ToolbarObject.Count + 1, "移动", "移动", Pmove) 最后一个变量Pmove可以是自定义的函数对像吧?? 请指教!<BR>
页:
[1]