查看: 332  |  回复: 0
  VB6 Addin导致菜单丢失
楼主
发表于 2024年6月6日 17:51

翻译:

这是一个恼人的我今天终于想通了。

如果您使用VB 6 IDE插件,有时您会注意到各种菜单项 开始消失如果发生这种情况,您必须右键单击图标工具栏,然后选择自定义/重置。

所以很明显...如果向工具栏添加按钮或添加菜单项,则必须明确确保在Addin断开连接时将其删除。

如果你不这样做,VB将只是随机删除一些其他按钮或菜单项,然后保存在注册表中的设置,为下次你启动它作为一个秘密的小礼物。

如果断开连接代码中的任何内容抛出错误,这可能会偶尔出现。您必须在所有地方进行错误处理和测试,因为VB 6 IDE插件模型可能会在启动或断开连接时抛出随机错误。它有点烦人,似乎不完全稳定,但嘿,这是我们所拥有的,它实际上相当不错,特别是考虑到年龄。 


让IDE看起来像我想要的。然后创建一个.reg文件,并使用一个helper exe启动VB 6 IDE,首先执行以下操作 Shell RegEdit. exe/S CProgram Files(x86)Microsoft Visual StudioVB98VB6 IDE UI Fix.reg VB6 IDE UI Fix.reg [HKEY_CURRENT_USERDWARE Microsoft Visual Basic 6.0] UIhex59,00,00,...     


原文:

Here is an annoying I just finally figured out today.

If you use VB6 IDE addins sometimes you will notice that various menu items start disappearing. If this happens you have to right click on the icon tool bar and choose customize/reset.

So apparently..if you add a button to toolbar or add a menu item, you must explicitly make sure to delete it on addin disconnect.

If you dont, VB will just randomly delete some other button or menu item and then save the setting in the registry for the next time you start it up as a secret little present.

If anything in your disconnect code throws an error, this can show up sporadically. You have to have error handling and tests everywhere because the VB6 IDE addin model can throw random errors often on startup or disconnect. Its somewhat annoying and doesnt seem perfectly stable but hey its what we have and its actually pretty good especially given the age. 


I make the IDE looks like I want. Then make a .reg file ans start VB6 IDE with a helper exe where I first do the following Shell RegEdit.exe /S CProgram Files (x86)Microsoft Visual StudioVB98VB6 IDE UI Fix.reg VB6 IDE UI Fix.reg [HKEY_CURRENT_USERSOFTWAREMicrosoftVisual Basic6.0] UIhex59,00,00,.........

您需要登录后才可以回帖 登录 | 立即注册
【本版规则】请勿发表违反国家法律的内容,否则会被冻结账号和删贴。
用户名: 立即注册
密码:
2020-2024 MaNongKu.com