New c# User

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

New c# User
Trying to get the example in VB from the manual to work in c# 
Louis Bruso Jr




Posts: 2
Joined: 2006-01-30
I am a new user of Add-In Express. I have considerable experience in visual studio C++ Console Applications and some experience with visual basic and c# Windows applications using Windows Forms.

What I am trying do do is create an Excel Add in using the Command Bar example you have in the getting started section of your documentation.

It works fine in visual basic. When I try it in C#, the screens are exactly the same (which is good). I inserted the following code like I did in visual basic.

private void adxCommandBarButton1_click(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
System.Windows.Forms.MessageBox.Show("i've done this in c#");
}

It builds with no errors and I can regester it no problem. In Excel, the Command bar appears, but when I press the bar, nothing happens. In visual basic, the message comes up no problem, but in C#, using the same steps and the c# syntax for the messagebox.show command, it does not.

I tried to debug the C# application, but cannot find Start Program anywhere in the Project Options Window.
[CODE]
Posted 30 Jan, 2006 05:53:33 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Louis.

Actually, the event handler for the ADX Command Bar button should have the following signature:
private void adxCommandBarButton1_Click(object sender)
{
}
Why do you use the System.Windows.Forms.LinkLabelLinkClickedEventArgs class in the button event handler?

I tried to debug the C# application, but cannot find Start Program anywhere in the Project Options Window.

You just need to set Microsoft Excel as a start program and run the project.



Posted 30 Jan, 2006 20:06:06 Top