Re: variable length arguments

Tech-Archive recommends: Fix windows errors by optimizing your registry



hey Cindy, apologies for having given a totally irrelevant subject line,
unknowingly I missed it.

the code you asked for is:

public void OnStartupComplete(ref Array custom)
{
try{

commandBar =
(CommandBar)myApplication.CommandBars.Add("MYCommandBar",Type.Missing,Type.Missing, true);
commandBar.Visible = true;
this.commandBar.Position = MsoBarPosition.msoBarTop;
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show(e.Message);
}
try
{
firstButton = (CommandBarButton)commandBar.Controls["GUIDE"];
}
catch ( Exception )
{
firstButton =
(CommandBarButton)commandBar.Controls.Add(MsoControlType.msoControlButton,
Type.Missing,Type.Missing, Type.Missing, Type.Missing);
firstButton.Caption = "GUIDE";
firstButton.FaceId = 86;
firstButton.Click +=
new _CommandBarButtonEvents_ClickEventHandler(ButtonClick);
}
}

.


Quantcast