Toolbar growing on Vista

Add-in Express™ Support Service
That's what is more important than anything else

Toolbar growing on Vista
ADX 2.8 toolbar grows to unusable size 
Will Morgan




Posts: 23
Joined: 2006-12-11
Under Vista Word 2000 and Vista Access XP the toolbar is growing eveytime the appliation is opend.

Only the comboboxes and dropdown lists are increasing in width
Posted 14 Dec, 2006 12:06:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Will.

I will test it and will let you know about results soon.



P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.

Posted 14 Dec, 2006 16:58:17 Top
Will Morgan




Posts: 23
Joined: 2006-12-11
Any ideas?
Posted 03 Jan, 2007 09:48:32 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Will.

I have just tested an ADX based add-in in Vista + Word 2000. It works fine. I haven't noticed any problems with combo boxes and drop down lists.
Can I look at your code?
Posted 03 Jan, 2007 11:55:22 Top
Will Morgan




Posts: 23
Joined: 2006-12-11
Does it with word 2002 as well. I can't send you my whole project and at present don't have time to recreate in a test project. I will probaly have to just not support Vista in my first release and try to create a patch as soon as possible.

It grows every time you close word. If your looking at it when word closes you can see the size jump. Then it's saved in the normal.dot file.

Posted 03 Jan, 2007 14:14:04 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Will, doesn it happen with any documents? Do you see the same behaviour when you open Word with an empty document and then close the application?
Posted 04 Jan, 2007 08:30:29 Top
Will Morgan




Posts: 23
Joined: 2006-12-11
Yes it happens with all documents. I am in the process of trying to replicate it with a smaller project from scratch without success. I will continue investigate. When I have the problem replicated I'll send you the code.
Posted 04 Jan, 2007 09:43:24 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Ok. Thank you.
Posted 04 Jan, 2007 09:57:14 Top
Will Morgan




Posts: 23
Joined: 2006-12-11
The following code will make the comboboxes grow.

Basically on Vista if you disable the combobox in the Word.DocumentBeforeClose event the combo will double in size each time.

Will

using System;
using System.Runtime.InteropServices;
using System.ComponentModel;

namespace ADX2007
{
/// <summary>
/// Add-in Express Add-in Module
/// </summary>
[GuidAttribute("EEE21CBB-C9E6-4069-9B05-DBAB4E266681"), ProgId("ADX2007.AddinModule")]
public class AddinModule : AddinExpress.MSO.ADXAddinModule
{
public AddinModule()
{
InitializeComponent();
}

private AddinExpress.MSO.ADXCommandBar adxWBCCommandBar;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonPaint;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonAbout;
private AddinExpress.MSO.ADXCommandBarComboBox adxCommandBarComboBoxSize;
private AddinExpress.MSO.ADXCommandBarDropDownList adxCommandBarDropDownListSym;
private AddinExpress.MSO.ADXCommandBarDropDownList adxCommandBarDropDownListRes;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonCD;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonSHCD;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonLink;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonEdit;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonCreate;
private AddinExpress.MSO.ADXCommandBarButton adxCommandBarButtonCaption;
private AddinExpress.MSO.ADXWordAppEvents adxWordEvents;

#region Component Designer generated code
/// <summary>
/// Required by designer
/// </summary>
private System.ComponentModel.IContainer components;

/// <summary>
/// Required by designer support - do not modify
/// the following method
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.adxWBCCommandBar = new AddinExpress.MSO.ADXCommandBar(this.components);
this.adxCommandBarButtonAbout = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarDropDownListSym = new AddinExpress.MSO.ADXCommandBarDropDownList(this.components);
this.adxCommandBarComboBoxSize = new AddinExpress.MSO.ADXCommandBarComboBox(this.components);
this.adxCommandBarDropDownListRes = new AddinExpress.MSO.ADXCommandBarDropDownList(this.components);
this.adxCommandBarButtonCaption = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonCD = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonSHCD = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonLink = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonPaint = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonEdit = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxCommandBarButtonCreate = new AddinExpress.MSO.ADXCommandBarButton(this.components);
this.adxWordEvents = new AddinExpress.MSO.ADXWordAppEvents(this.components);
//
// adxWBCCommandBar
//
this.adxWBCCommandBar.CommandBarName = "Wasp Testy";
this.adxWBCCommandBar.CommandBarTag = "7534fad6-bad7-409f-9d42-e25be0506555";
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonAbout);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarDropDownListSym);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarComboBoxSize);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarDropDownListRes);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonCaption);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonCD);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonSHCD);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonLink);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonPaint);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonEdit);
this.adxWBCCommandBar.Controls.Add(this.adxCommandBarButtonCreate);
this.adxWBCCommandBar.Description = "Wasp BarcodeFactory Toolbar";
this.adxWBCCommandBar.Position = AddinExpress.MSO.ADXMsoBarPosition.adxMsoBarTop;
this.adxWBCCommandBar.Protection = AddinExpress.MSO.ADXMsoBarProtection.adxMsoBarNoVerticalDock;
this.adxWBCCommandBar.SupportedApps = ((AddinExpress.MSO.ADXOfficeHostApp)(((AddinExpress.MSO.ADXOfficeHostApp.ohaExcel | AddinExpress.MSO.ADXOfficeHostApp.ohaWord)
| AddinExpress.MSO.ADXOfficeHostApp.ohaAccess)));
this.adxWBCCommandBar.UpdateCounter = 21;
//
// adxCommandBarButtonAbout
//
this.adxCommandBarButtonAbout.BeginGroup = true;
this.adxCommandBarButtonAbout.Caption = "About";
this.adxCommandBarButtonAbout.ControlTag = "346dc26f-a6a5-4421-ba68-5b800bbf5a5b";
this.adxCommandBarButtonAbout.DescriptionText = "About";
this.adxCommandBarButtonAbout.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonAbout.OlExplorerItemTypes = AddinExpress.MSO.ADXOlExplorerItemTypes.olUnknownItem;
this.adxCommandBarButtonAbout.OlInspectorItemTypes = AddinExpress.MSO.ADXOlInspectorItemTypes.olUnknown;
this.adxCommandBarButtonAbout.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonAbout.TooltipText = "About";
this.adxCommandBarButtonAbout.UpdateCounter = 15;
//
// adxCommandBarDropDownListSym
//
this.adxCommandBarDropDownListSym.ControlTag = "8a938bf4-c86d-4010-94fa-13367b4b97cf";
this.adxCommandBarDropDownListSym.DropDownLines = 16;
this.adxCommandBarDropDownListSym.DropDownWidth = 150;
this.adxCommandBarDropDownListSym.OlItemTypeAction = AddinExpress.MSO.ADXOLItemTypeAction.adxOlActionShow;
this.adxCommandBarDropDownListSym.Style = AddinExpress.MSO.ADXMsoComboStyle.adxMsoComboLabel;
this.adxCommandBarDropDownListSym.TooltipText = "Symbology";
this.adxCommandBarDropDownListSym.UpdateCounter = 19;
this.adxCommandBarDropDownListSym.Width = 150;
//
// adxCommandBarComboBoxSize
//
this.adxCommandBarComboBoxSize.Caption = "Symbologies";
this.adxCommandBarComboBoxSize.ControlTag = "66390637-bec3-44e2-8ca3-1996f0ede790";
this.adxCommandBarComboBoxSize.DescriptionText = "Symbologies";
this.adxCommandBarComboBoxSize.DropDownLines = 5;
this.adxCommandBarComboBoxSize.Items.AddRange(new string[] {
"8",
"10",
"12",
"18",
"24",
"36",
"48",
"72"});
this.adxCommandBarComboBoxSize.ListIndex = 5;
this.adxCommandBarComboBoxSize.TooltipText = "Size";
this.adxCommandBarComboBoxSize.UpdateCounter = 11;
//
// adxCommandBarDropDownListRes
//
this.adxCommandBarDropDownListRes.ControlTag = "30ca21f1-9748-4a1e-a49c-09e6a02f3f50";
this.adxCommandBarDropDownListRes.Items.AddRange(new string[] {
"High",
"Medium",
"Low"});
this.adxCommandBarDropDownListRes.ListIndex = 2;
this.adxCommandBarDropDownListRes.TooltipText = "Resolution";
this.adxCommandBarDropDownListRes.UpdateCounter = 7;
//
// adxCommandBarButtonCaption
//
this.adxCommandBarButtonCaption.ControlTag = "1adc0874-63e1-4afb-9241-aa64c0f2a426";
this.adxCommandBarButtonCaption.Image = 11;
this.adxCommandBarButtonCaption.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonCaption.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonCaption.TooltipText = "Caption";
this.adxCommandBarButtonCaption.UpdateCounter = 15;
//
// adxCommandBarButtonCD
//
this.adxCommandBarButtonCD.ControlTag = "6daa505d-02b9-47c4-87dc-7c396effc5c2";
this.adxCommandBarButtonCD.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonCD.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonCD.TooltipText = "Check Digit";
this.adxCommandBarButtonCD.UpdateCounter = 8;
//
// adxCommandBarButtonSHCD
//
this.adxCommandBarButtonSHCD.ControlTag = "ea7c435b-7349-48c0-be59-c11229a88b78";
this.adxCommandBarButtonSHCD.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonSHCD.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonSHCD.TooltipText = "Show Check Digit";
this.adxCommandBarButtonSHCD.UpdateCounter = 8;
//
// adxCommandBarButtonLink
//
this.adxCommandBarButtonLink.ControlTag = "168fcf99-b325-4da1-872a-7f09c35bfcdf";
this.adxCommandBarButtonLink.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonLink.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonLink.TooltipText = "Link";
this.adxCommandBarButtonLink.UpdateCounter = 10;
//
// adxCommandBarButtonPaint
//
this.adxCommandBarButtonPaint.ControlTag = "d6401c98-dbbf-4e28-8425-652c9f0cfddc";
this.adxCommandBarButtonPaint.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonPaint.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonPaint.TooltipText = "Format Paint";
this.adxCommandBarButtonPaint.UpdateCounter = 11;
//
// adxCommandBarButtonEdit
//
this.adxCommandBarButtonEdit.ControlTag = "5b220a99-4bc0-4a2c-9719-491e0756dbd9";
this.adxCommandBarButtonEdit.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonEdit.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonEdit.UpdateCounter = 7;
//
// adxCommandBarButtonCreate
//
this.adxCommandBarButtonCreate.ControlTag = "a2012297-ed14-4530-8bd2-1d5aeb1dc6ee";
this.adxCommandBarButtonCreate.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxCommandBarButtonCreate.Style = AddinExpress.MSO.ADXMsoButtonStyle.adxMsoButtonIcon;
this.adxCommandBarButtonCreate.TooltipText = "Create";
this.adxCommandBarButtonCreate.UpdateCounter = 10;
//
// adxWordEvents
//
this.adxWordEvents.DocumentBeforeClose += new AddinExpress.MSO.ADXHostBeforeAction_EventHandler(this.OnBeforeClose);
//
// AddinModule
//
this.AddinName = "Testy";
this.RegisterForAllUsers = true;
this.SupportedApps = ((AddinExpress.MSO.ADXOfficeHostApp)(((AddinExpress.MSO.ADXOfficeHostApp.ohaExcel | AddinExpress.MSO.ADXOfficeHostApp.ohaWord)
| AddinExpress.MSO.ADXOfficeHostApp.ohaAccess)));

}
#endregion

#region Add-in Express automatic code

// Required by Add-in Express - do not modify
// the methods within this region

public override System.ComponentModel.IContainer GetContainer()
{
if (components == null)
components = new System.ComponentModel.Container();
return components;
}

[ComRegisterFunctionAttribute]
public static void AddinRegister(Type t)
{
AddinExpress.MSO.ADXAddinModule.ADXRegister(t);
}

[ComUnregisterFunctionAttribute]
public static void AddinUnregister(Type t)
{
AddinExpress.MSO.ADXAddinModule.ADXUnregister(t);
}

public override void UninstallControls()
{
base.UninstallControls();
}

#endregion

public Access._Application AccessApp
{
get
{
return (HostApplication as Access._Application);
}
}

public Excel._Application ExcelApp
{
get
{
return (HostApplication as Excel._Application);
}
}

public Word._Application WordApp
{
get
{
return (HostApplication as Word._Application);
}
}

private void OnBeforeClose(object sender, AddinExpress.MSO.ADXHostBeforeActionEventArgs e)
{
adxCommandBarComboBoxSize.Enabled = !adxCommandBarComboBoxSize.Enabled;
adxCommandBarDropDownListSym.Enabled = !adxCommandBarDropDownListSym.Enabled;
adxCommandBarDropDownListRes.Enabled = !adxCommandBarDropDownListRes.Enabled;
}

}
}


Posted 05 Jan, 2007 16:18:22 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Will.

I tested the code. It worked fine in Vista Business + Word 2000 SR-1 with the latest Add-in Express .NET version (v3.1).
Posted 08 Jan, 2007 09:06:35 Top