Toolbar automatically show???

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

Toolbar automatically show???
 
Thorn x




Posts: 4
Joined: 2009-07-20
Hello, I have a problem with a provided IE-toolbar. This is not activated after the installation automatically and now the question where is one this can activate?
Posted 20 Jul, 2009 16:12:27 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Thorn,

Make sure that you set LoadAtStartup = true. Also, your toolbar might be shown too close to the right side of an existing toolbar. Try Position = NewRow.


Andrei Smolin
Add-in Express Team Leader
Posted 21 Jul, 2009 06:34:19 Top
Brett Miller




Posts: 4
Joined: 2009-07-21
Hi Andrei,

I am having the same problem as Thorn, but I have set LoadAtStartUp to true and set the position to NewRow. But I still have to right click and select the toolbar to display it.

I think I must be missing something

Posted 21 Jul, 2009 06:39:52 Top
Thorn x




Posts: 4
Joined: 2009-07-20
I use the ADXIET.ToolbarModule and do not find the settings to it.
Where exactly do the settings stand there?


  • LoadAtStartUp

Posted 21 Jul, 2009 07:08:58 Top
Brett Miller




Posts: 4
Joined: 2009-07-21
This is the auto generated code from the IEModule.cs from my project if it helps:



private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.adxieV4AToolBar = new AddinExpress.IE.ADXIEToolBarItem(this.components);
            // 
            // adxieV4AToolBar
            // 
            this.adxieV4AToolBar.LoadAtStartup = true;
            this.adxieV4AToolBar.MenuText = "V4A Toolbar";
            this.adxieV4AToolBar.Position = AddinExpress.IE.ADXIEToolBarPosition.tbpNewRow;
            this.adxieV4AToolBar.Title = " ";
            this.adxieV4AToolBar.ToolBarType = "V4ABar.V4AToolBar";
            // 
            // IEModule
            // 
            this.ModuleName = "V4ABar";
            this.ToolBars.Add(this.adxieV4AToolBar);
            this.OnConnect += new AddinExpress.IE.ADXIEConnect_EventHandler(this.IEModule_OnConnect);

        }
Posted 21 Jul, 2009 07:12:02 Top
Thorn x




Posts: 4
Joined: 2009-07-20
I do not find these settings.

My example:

using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Windows.Forms;
using IE = Interop.SHDocVw;
using AddinExpress;
 
namespace Online_Downloaden_Toolbar
{
    /// <summary>
    /// Add-in Express .NET for Internet Explorer Bar
    /// </summary>
    [ComVisible(true), Guid("40090C1A-85C9-419D-B493-6119F95D97A4")]
    public class Toolbar : AddinExpress.IE.ADXIEToolbarModule
    {
        public Toolbar()
        {
            InitializeComponent();
         }

        #region Einbinden der Klassen
        WebClass WebClass = new WebClass();
        TimerClass TimerClass = new TimerClass();
        SettingClass SettingClass = new SettingClass();
        #endregion

        private Label label1;
        private Button Button_Menu;
        private ContextMenuStrip ContextMenuStrip_Menu;
        private ToolStripMenuItem einstellungenToolStripMenuItem;
        private ToolStripMenuItem aktuelleBenutzermitteilung?ffnenToolStripMenuItem;
        private Button Button_Search;
        private TextBox TextBox_SearchString;
        private LinkLabel LinkLabel_OD;
 
        #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.label1 = new System.Windows.Forms.Label();
            this.ContextMenuStrip_Menu = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.einstellungenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.aktuelleBenutzermitteilung?ffnenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.Button_Search = new System.Windows.Forms.Button();
            this.Button_Menu = new System.Windows.Forms.Button();
            this.TextBox_SearchString = new System.Windows.Forms.TextBox();
            this.LinkLabel_OD = new System.Windows.Forms.LinkLabel();
            this.ContextMenuStrip_Menu.SuspendLayout();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.BackColor = System.Drawing.Color.Transparent;
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(76, 8);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(72, 15);
            this.label1.TabIndex = 1;
            this.label1.Text = "Suchbegriff:";
            // 
            // ContextMenuStrip_Menu
            // 
            this.ContextMenuStrip_Menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.einstellungenToolStripMenuItem,
            this.aktuelleBenutzermitteilung?ffnenToolStripMenuItem});
            this.ContextMenuStrip_Menu.Name = "ContextMenuStrip_Menu";
            this.ContextMenuStrip_Menu.Size = new System.Drawing.Size(269, 48);
            // 
            // einstellungenToolStripMenuItem
            // 
            this.einstellungenToolStripMenuItem.Name = "einstellungenToolStripMenuItem";
            this.einstellungenToolStripMenuItem.Size = new System.Drawing.Size(268, 22);
            this.einstellungenToolStripMenuItem.Text = "Einstellungen...";
            // 
            // aktuelleBenutzermitteilung?ffnenToolStripMenuItem
            // 
            this.aktuelleBenutzermitteilung?ffnenToolStripMenuItem.Name = "aktuelleBenutzermitteilung?ffnenToolStripMenuItem";
            this.aktuelleBenutzermitteilung?ffnenToolStripMenuItem.Size = new System.Drawing.Size(268, 22);
            this.aktuelleBenutzermitteilung?ffnenToolStripMenuItem.Text = "Aktuelle Benutzermitteilung ?ffnen...";
            // 
            // Button_Search
            // 
            this.Button_Search.BackColor = System.Drawing.Color.Transparent;
            this.Button_Search.ContextMenuStrip = this.ContextMenuStrip_Menu;
            this.Button_Search.FlatAppearance.BorderSize = 0;
            this.Button_Search.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
            this.Button_Search.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
            this.Button_Search.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.Button_Search.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Button_Search.ForeColor = System.Drawing.SystemColors.ControlText;
            this.Button_Search.Image = global::Online_Downloaden_Toolbar.Properties.Resources.Search;
            this.Button_Search.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.Button_Search.Location = new System.Drawing.Point(292, 4);
            this.Button_Search.Name = "Button_Search";
            this.Button_Search.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.Button_Search.Size = new System.Drawing.Size(109, 26);
            this.Button_Search.TabIndex = 5;
            this.Button_Search.Text = "Suche starten";
            this.Button_Search.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.Button_Search.UseVisualStyleBackColor = true;
            this.Button_Search.Click += new System.EventHandler(this.Button_Search_Click);
            // 
            // Button_Menu
            // 
            this.Button_Menu.BackColor = System.Drawing.Color.Transparent;
            this.Button_Menu.ContextMenuStrip = this.ContextMenuStrip_Menu;
            this.Button_Menu.FlatAppearance.BorderSize = 0;
            this.Button_Menu.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
            this.Button_Menu.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
            this.Button_Menu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.Button_Menu.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Button_Menu.ForeColor = System.Drawing.SystemColors.ControlText;
            this.Button_Menu.Image = global::Online_Downloaden_Toolbar.Icons.Icon_16;
            this.Button_Menu.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.Button_Menu.Location = new System.Drawing.Point(3, 3);
            this.Button_Menu.Name = "Button_Menu";
            this.Button_Menu.Size = new System.Drawing.Size(67, 26);
            this.Button_Menu.TabIndex = 3;
            this.Button_Menu.Text = "Men?";
            this.Button_Menu.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.Button_Menu.UseVisualStyleBackColor = false;
            this.Button_Menu.Click += new System.EventHandler(this.Button_Menu_Click);
            // 
            // TextBox_SearchString
            // 
            this.TextBox_SearchString.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.TextBox_SearchString.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.TextBox_SearchString.Location = new System.Drawing.Point(154, 6);
            this.TextBox_SearchString.Name = "TextBox_SearchString";
            this.TextBox_SearchString.Size = new System.Drawing.Size(132, 21);
            this.TextBox_SearchString.TabIndex = 7;
            // 
            // LinkLabel_OD
            // 
            this.LinkLabel_OD.AutoSize = true;
            this.LinkLabel_OD.BackColor = System.Drawing.Color.Transparent;
            this.LinkLabel_OD.Location = new System.Drawing.Point(407, 10);
            this.LinkLabel_OD.Name = "LinkLabel_OD";
            this.LinkLabel_OD.Size = new System.Drawing.Size(166, 13);
            this.LinkLabel_OD.TabIndex = 8;
            this.LinkLabel_OD.TabStop = true;
            this.LinkLabel_OD.Text = "test";
            this.LinkLabel_OD.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel_OD_LinkClicked);
            // 
            // Toolbar
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.Controls.Add(this.LinkLabel_OD);
            this.Controls.Add(this.Button_Menu);
            this.Controls.Add(this.Button_Search);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.TextBox_SearchString);
            this.Name = "Online_Downloaden_Toolbar";
            this.Position = AddinExpress.IE.ADXIEToolBarPosition.tbpNewRow;
            this.Size = new System.Drawing.Size(648, 32);
            this.Load += new System.EventHandler(this.IEToolBarModule_Load);
            this.ContextMenuStrip_Menu.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        #endregion
 
        #region ADX 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 RegisterIEToolbarModule(Type t)
        {
            AddinExpress.IE.ADXIEToolbarModule.RegisterIEToolbarModuleInternal(t);
        }
 
        [ComUnregisterFunctionAttribute]
        public static void UnregisterIEToolbarModule(Type t)
        {
            AddinExpress.IE.ADXIEToolbarModule.UnregisterIEToolbarModuleInternal(t);
        }
 
        #endregion
         
        public IE.WebBrowser IEApp
        {
            get
            {
                return (this.IEObj as IE.WebBrowser);
            }
        }
 
        public mshtml.HTMLDocument HTMLDocument
        {
            get
            {
                return (this.HTMLDocumentObj as mshtml.HTMLDocument);
            }
        }

        private void Button_Menu_Click(object sender, EventArgs e)
        {
            (new Form_Menu()).ShowDialog();
        }

        private void Button_Search_Click(object sender, EventArgs e)
        {

        }

        private void LinkLabel_OD_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {

        }

        /// <summary>
        /// Angegebene Seite im Browser im aktuellen Tab ?ffnen
        /// </summary>
        private void OpenURL(String URL)
        {

        }

        private void IEToolBarModule_Load(object sender, EventArgs e)
        {

        }
 
    }
}
Posted 21 Jul, 2009 08:36:19 Top
Brett Miller




Posts: 4
Joined: 2009-07-21
Hi Thorn x,

Im just starting out with the ADXIE component, but I believe that you have created a project that only contains the ADXIEToolbarModule. I think you need to start with an Add-In module as the base for your project and then add the toolbar module to this project.

I may be completely wrong but this is how the examples work :D
Posted 21 Jul, 2009 08:47:15 Top
Brett Miller




Posts: 4
Joined: 2009-07-21
My issues still exists, the first time I run my project the toolbar shows automatically but it does not appear on new tabs and if I restart IE the toolbar does not automatically show (I have to right click and select my toolbar).

If anyone could shed any light on this issue I would be very grateful.
Posted 21 Jul, 2009 09:45:43 Top
Thorn x




Posts: 4
Joined: 2009-07-20
I would be also very grateful.
Posted 21 Jul, 2009 12:11:38 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hi Brett and Thorn,

The following code works fine for me in an IE Toolbar project:

private void IEToolBarModule_OnConnect(object sender, int threadId)
{
    object g = typeof(IEToolBarModule).GUID.ToString("B");
    object bShow = true;
    object dummy = null;

    IEApp.ShowBrowserBar(ref g, ref bShow, ref dummy);
}



Andrei Smolin
Add-in Express Team Leader
Posted 23 Jul, 2009 03:57:58 Top